Volver a NPA

Módulos

Mathlib.Vector.Dot

npa-mathlib

Paquetes

2

Módulos

63

Teoremas

750

Declaraciones

1016

Datos auxiliares no verificados

El código fuente y la información de presentación ayudan a examinar el contenido. La evidencia de la demostración se basa en los datos canónicos del certificado y el resultado del verificador.

Teoremas

17

Definiciones

3

Tipos inductivos

0

Axiomas

0

Declaraciones

dot

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

Definiciones

normSq

forall (v : Vec), RingElem

Definiciones

distSq

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

Definiciones

dot_comm

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

Teoremas

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

Teoremas

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

Teoremas

dot_neg_left

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

Teoremas

dot_neg_right

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

Teoremas

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

Teoremas

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

Teoremas

norm_sq_def

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

Teoremas

dist_sq_def

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

Teoremas

dot_self_eq_norm_sq

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

Teoremas

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

Teoremas

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

Teoremas

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

Teoremas

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

Teoremas

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

Teoremas

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

Teoremas

norm_sq_nonneg

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

Teoremas

Huellas digitales

Huella del código fuente
sha256:e2a099291cd5b9bbb7cabb0c89bcc8dede989f06631c0cd576e32d94fc092d8e
Huella del archivo de certificado
sha256:69ccee0d0413970d6688bc0542ece3be9a85c2eadb696e58d5e36a381ec97136
Huella de la exportación
sha256:9d23eb89f95ae6e1cc171d32c82f8a28fe11bc60d05f3b26fb05640dbc73e63c
Huella del informe de axiomas
sha256:fed11e73accfbfb0dfc28b4f510e151fa33d8af82d58fdb23b92567e04e59e40
Huella del certificado
sha256:a7efefe3ee1f35d232c2e4c7e6cc417153c2224a14c6bdc7aa8144cf32e350f1

Código fuente

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