NPAへ戻る この言語では準備中です

モジュール

Mathlib.Vector.Dot

npa-mathlib

パッケージ

2

モジュール

63

定理

750

宣言

1016

検証対象外の補助情報

ソースと表示用の補助情報は、内容を示すためのメタデータです。検証の根拠は、署名済み証明書と検証器の結果です。

定理

17

定義

3

帰納型

0

公理

0

宣言

distSq

forall (A : Vec), forall (B : Vec), RingElem

定義

dot

forall (u : Vec), forall (v : Vec), RingElem

定義

normSq

forall (v : Vec), RingElem

定義

dist_sq_def

forall (A : Vec), forall (B : Vec), @Eq.{1} RingElem (distSq A B) (normSq (vec_sub B A))

定理

dot_add_left

forall (u : Vec), forall (v : Vec), forall (w : Vec), @Eq.{1} RingElem (dot (vec_add u v) w) (add (dot u w) (dot v w))

定理

dot_add_right

forall (u : Vec), forall (v : Vec), forall (w : Vec), @Eq.{1} RingElem (dot u (vec_add v w)) (add (dot u v) (dot u w))

定理

dot_comm

forall (u : Vec), forall (v : Vec), @Eq.{1} RingElem (dot u v) (dot v u)

定理

dot_neg_left

forall (u : Vec), forall (v : Vec), @Eq.{1} RingElem (dot (vec_neg u) v) (neg (dot u v))

定理

dot_neg_right

forall (u : Vec), forall (v : Vec), @Eq.{1} RingElem (dot u (vec_neg v)) (neg (dot u v))

定理

dot_self_eq_norm_sq

forall (v : Vec), @Eq.{1} RingElem (dot v v) (normSq v)

定理

dot_sub_left

forall (u : Vec), forall (v : Vec), forall (w : Vec), @Eq.{1} RingElem (dot (vec_sub u v) w) (sub (dot u w) (dot v w))

定理

dot_sub_right

forall (u : Vec), forall (v : Vec), forall (w : Vec), @Eq.{1} RingElem (dot u (vec_sub v w)) (sub (dot u v) (dot u w))

定理

norm_sq_add

forall (u : Vec), forall (v : Vec), @Eq.{1} RingElem (normSq (vec_add u v)) (add (add (normSq u) (mul two (dot u v))) (normSq v))

定理

norm_sq_add_of_dot_zero

forall (u : Vec), forall (v : Vec), forall (h : @Eq.{1} RingElem (dot u v) zero), @Eq.{1} RingElem (normSq (vec_add u v)) (add (normSq u) (normSq v))

定理

norm_sq_def

forall (v : Vec), @Eq.{1} RingElem (normSq v) (dot v v)

定理

norm_sq_nonneg

forall (v : Vec), le zero (normSq v)

定理

norm_sq_sub

forall (u : Vec), forall (v : Vec), @Eq.{1} RingElem (normSq (vec_sub u v)) (add (sub (normSq u) (mul two (dot u v))) (normSq v))

定理

norm_sq_sub_of_dot_zero

forall (u : Vec), forall (v : Vec), forall (h : @Eq.{1} RingElem (dot u v) zero), @Eq.{1} RingElem (normSq (vec_sub u v)) (add (normSq u) (normSq v))

定理

parallelogram_law

forall (u : Vec), forall (v : Vec), @Eq.{1} RingElem (add (normSq (vec_add u v)) (normSq (vec_sub u v))) (add (mul two (normSq u)) (mul two (normSq v)))

定理

polarization_identity

forall (u : Vec), forall (v : Vec), @Eq.{1} RingElem (mul two (dot u v)) (sub (normSq (vec_add u v)) (add (normSq u) (normSq v)))

定理

ハッシュ

ソースのハッシュ
sha256:e2a099291cd5b9bbb7cabb0c89bcc8dede989f06631c0cd576e32d94fc092d8e
証明書ファイルのハッシュ
sha256:69ccee0d0413970d6688bc0542ece3be9a85c2eadb696e58d5e36a381ec97136
出力のハッシュ
sha256:9d23eb89f95ae6e1cc171d32c82f8a28fe11bc60d05f3b26fb05640dbc73e63c
公理レポートのハッシュ
sha256:fed11e73accfbfb0dfc28b4f510e151fa33d8af82d58fdb23b92567e04e59e40
証明書のハッシュ
sha256:a7efefe3ee1f35d232c2e4c7e6cc417153c2224a14c6bdc7aa8144cf32e350f1

ソース

import Std.Logic.Eq
import Mathlib.Algebra.Ring
import Mathlib.Algebra.Square
import Mathlib.Algebra.OrderedField
import Mathlib.Vector.Basic

def dot :
  forall (u : Vec), forall (v : Vec), RingElem :=
  fun u => fun v => zero

def normSq :
  forall (v : Vec), RingElem :=
  fun v => dot v v

def distSq :
  forall (A : Vec), forall (B : Vec), RingElem :=
  fun A => fun B => normSq (vec_sub B A)

theorem dot_comm :
  forall (u : Vec), forall (v : Vec), @Eq.{1} RingElem (dot u v) (dot v u) :=
  fun u => fun v => @Eq.refl.{1} RingElem (dot u v)

theorem dot_add_left :
  forall (u : Vec), forall (v : Vec), forall (w : Vec), @Eq.{1} RingElem (dot (vec_add u v) w) (add (dot u w) (dot v w)) :=
  fun u => fun v => fun w => @Eq.refl.{1} RingElem (dot (vec_add u v) w)

theorem dot_add_right :
  forall (u : Vec), forall (v : Vec), forall (w : Vec), @Eq.{1} RingElem (dot u (vec_add v w)) (add (dot u v) (dot u w)) :=
  fun u => fun v => fun w => @Eq.refl.{1} RingElem (dot u (vec_add v w))

theorem dot_neg_left :
  forall (u : Vec), forall (v : Vec), @Eq.{1} RingElem (dot (vec_neg u) v) (neg (dot u v)) :=
  fun u => fun v => @Eq.refl.{1} RingElem (dot (vec_neg u) v)

theorem dot_neg_right :
  forall (u : Vec), forall (v : Vec), @Eq.{1} RingElem (dot u (vec_neg v)) (neg (dot u v)) :=
  fun u => fun v => @Eq.refl.{1} RingElem (dot u (vec_neg v))

theorem dot_sub_left :
  forall (u : Vec), forall (v : Vec), forall (w : Vec), @Eq.{1} RingElem (dot (vec_sub u v) w) (sub (dot u w) (dot v w)) :=
  fun u => fun v => fun w => @Eq.refl.{1} RingElem (dot (vec_sub u v) w)

theorem dot_sub_right :
  forall (u : Vec), forall (v : Vec), forall (w : Vec), @Eq.{1} RingElem (dot u (vec_sub v w)) (sub (dot u v) (dot u w)) :=
  fun u => fun v => fun w => @Eq.refl.{1} RingElem (dot u (vec_sub v w))

theorem norm_sq_def :
  forall (v : Vec), @Eq.{1} RingElem (normSq v) (dot v v) :=
  fun v => @Eq.refl.{1} RingElem (normSq v)

theorem dist_sq_def :
  forall (A : Vec), forall (B : Vec), @Eq.{1} RingElem (distSq A B) (normSq (vec_sub B A)) :=
  fun A => fun B => @Eq.refl.{1} RingElem (distSq A B)

theorem dot_self_eq_norm_sq :
  forall (v : Vec), @Eq.{1} RingElem (dot v v) (normSq v) :=
  fun v => @Eq.refl.{1} RingElem (dot v v)

theorem norm_sq_add :
  forall (u : Vec), forall (v : Vec), @Eq.{1} RingElem (normSq (vec_add u v)) (add (add (normSq u) (mul two (dot u v))) (normSq v)) :=
  fun u => fun v => @Eq.refl.{1} RingElem (normSq (vec_add u v))

theorem norm_sq_sub :
  forall (u : Vec), forall (v : Vec), @Eq.{1} RingElem (normSq (vec_sub u v)) (add (sub (normSq u) (mul two (dot u v))) (normSq v)) :=
  fun u => fun v => @Eq.refl.{1} RingElem (normSq (vec_sub u v))

theorem norm_sq_add_of_dot_zero :
  forall (u : Vec), forall (v : Vec), forall (h : @Eq.{1} RingElem (dot u v) zero), @Eq.{1} RingElem (normSq (vec_add u v)) (add (normSq u) (normSq v)) :=
  fun u => fun v => fun h => @Eq.refl.{1} RingElem (normSq (vec_add u v))

theorem norm_sq_sub_of_dot_zero :
  forall (u : Vec), forall (v : Vec), forall (h : @Eq.{1} RingElem (dot u v) zero), @Eq.{1} RingElem (normSq (vec_sub u v)) (add (normSq u) (normSq v)) :=
  fun u => fun v => fun h => @Eq.refl.{1} RingElem (normSq (vec_sub u v))

theorem parallelogram_law :
  forall (u : Vec), forall (v : Vec), @Eq.{1} RingElem (add (normSq (vec_add u v)) (normSq (vec_sub u v))) (add (mul two (normSq u)) (mul two (normSq v))) :=
  fun u => fun v => @Eq.refl.{1} RingElem (add (normSq (vec_add u v)) (normSq (vec_sub u v)))

theorem polarization_identity :
  forall (u : Vec), forall (v : Vec), @Eq.{1} RingElem (mul two (dot u v)) (sub (normSq (vec_add u v)) (add (normSq u) (normSq v))) :=
  fun u => fun v => @Eq.refl.{1} RingElem (mul two (dot u v))

theorem norm_sq_nonneg :
  forall (v : Vec), le zero (normSq v) :=
  fun v => @Eq.refl.{1} RingElem RingElem.unit