Retour à NPA

Module

Mathlib.Vector.Dot

npa-mathlib

Paquets

2

Modules

63

Théorèmes

750

Déclarations

1016

Informations complémentaires hors vérification

Les fichiers source et les informations d’affichage servent à explorer le contenu. La preuve repose sur les données du certificat canonique et sur le résultat du vérificateur.

Théorèmes

17

Définitions

3

Types inductifs

0

Axiomes

0

Déclarations

distSq

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

Définition

dot

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

Définition

normSq

forall (v : Vec), RingElem

Définition

dist_sq_def

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

Théorème

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))

Théorème

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))

Théorème

dot_comm

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

Théorème

dot_neg_left

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

Théorème

dot_neg_right

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

Théorème

dot_self_eq_norm_sq

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

Théorème

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))

Théorème

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))

Théorème

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))

Théorème

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))

Théorème

norm_sq_def

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

Théorème

norm_sq_nonneg

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

Théorème

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))

Théorème

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))

Théorème

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)))

Théorème

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)))

Théorème

Empreintes

Empreinte du fichier source
sha256:e2a099291cd5b9bbb7cabb0c89bcc8dede989f06631c0cd576e32d94fc092d8e
Empreinte du fichier de certificat
sha256:69ccee0d0413970d6688bc0542ece3be9a85c2eadb696e58d5e36a381ec97136
Empreinte de l’export
sha256:9d23eb89f95ae6e1cc171d32c82f8a28fe11bc60d05f3b26fb05640dbc73e63c
Empreinte du rapport sur les axiomes
sha256:fed11e73accfbfb0dfc28b4f510e151fa33d8af82d58fdb23b92567e04e59e40
Empreinte du certificat
sha256:a7efefe3ee1f35d232c2e4c7e6cc417153c2224a14c6bdc7aa8144cf32e350f1

Source

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