Back to NPA

Module

Mathlib.Geometry.Affine

npa-mathlib

Packages

2

Module

63

Theorems

750

Declarations

1016

Untrusted sidecar

Source text and display overlays are presentation metadata. The signed certificate and checker result are the trusted evidence.

Theorems

8

Definitions

7

Inductive types

0

Axioms

0

Declarations

Point

forall (Carrier : Sort p), Sort p

definition

disp

forall (PointCarrier : Sort p), forall (Vector : Sort v), forall (disp_op : forall (A : PointCarrier), forall (B : PointCarrier), Vector), forall (A : PointCarr...

definition

distSqPoints

forall (Scalar : Sort u), forall (Vector : Sort v), forall (inner : forall (x : Vector), forall (y : Vector), Scalar), forall (PointCarrier : Sort p), forall (d...

definition

translate

forall (PointCarrier : Sort p), forall (Vector : Sort v), forall (translate_op : forall (A : PointCarrier), forall (v : Vector), PointCarrier), forall (A : Poin...

definition

midpoint

forall (PointCarrier : Sort p), forall (midpoint_op : forall (A : PointCarrier), forall (B : PointCarrier), PointCarrier), forall (A : PointCarrier), forall (B...

definition

collinear

forall (PointCarrier : Sort p), forall (collinear_rel : forall (A : PointCarrier), forall (B : PointCarrier), forall (C : PointCarrier), Prop), forall (A : Poin...

definition

AffineLawArgs

forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (...

definition

disp_self

forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (...

theorem

disp_reverse

forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (...

theorem

disp_comp

forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (...

theorem

hypotenuse_vector_eq_sub_legs

forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (...

theorem

dist_sq_points_def

forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (...

theorem

point_ext_of_zero_disp

forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (...

theorem

dist_sq_symm

forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (...

theorem

dist_sq_zero_iff_eq

forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (...

theorem

Hashes

source
sha256:f1697fd4c3d4a81503821b1540ed3807ee97e9aaaed2bd5225257981cbace973
certificateFile
sha256:12ce563b23b473796fc4bdf0e17fcbb2ccd3c4565534e9f17bc911eee9660b6c
export
sha256:e4e3f862585856027ffe88cb2ed9cf0705d3fc14aa7a05e05e56d17edf0b60c5
axiomReport
sha256:3d3fdbf6a3ca4756ceaac9853e839a84878b24c0f6290e2246a78c6184b31e0e
certificate
sha256:e1f00b05158d700bfcdd2a947a500ab1f58bec799ee255e66eb316077a0f2085

Source

import Mathlib.Algebra.Ring.Basic
import Mathlib.Algebra.OrderedField.Basic
import Mathlib.Algebra.OrderedField.Square
import Mathlib.LinearAlgebra.VectorSpace
import Mathlib.LinearAlgebra.InnerProduct

def Point.{p} :
  forall (Carrier : Sort p), Sort p :=
  fun Carrier => Carrier

def disp.{p,v} :
  forall (PointCarrier : Sort p), forall (Vector : Sort v), forall (disp_op : forall (A : PointCarrier), forall (B : PointCarrier), Vector), forall (A : PointCarrier), forall (B : PointCarrier), Vector :=
  fun PointCarrier => fun Vector => fun disp_op => fun A => fun B => disp_op A B

def distSqPoints.{p,u,v} :
  forall (Scalar : Sort u), forall (Vector : Sort v), forall (inner : forall (x : Vector), forall (y : Vector), Scalar), forall (PointCarrier : Sort p), forall (disp_op : forall (A : PointCarrier), forall (B : PointCarrier), Vector), forall (A : PointCarrier), forall (B : PointCarrier), Scalar :=
  fun Scalar => fun Vector => fun inner => fun PointCarrier => fun disp_op => fun A => fun B => @normSq.{u,v} Scalar Vector inner (@disp.{p,v} PointCarrier Vector disp_op A B)

def translate.{p,v} :
  forall (PointCarrier : Sort p), forall (Vector : Sort v), forall (translate_op : forall (A : PointCarrier), forall (v : Vector), PointCarrier), forall (A : PointCarrier), forall (v : Vector), PointCarrier :=
  fun PointCarrier => fun Vector => fun translate_op => fun A => fun v => translate_op A v

def midpoint.{p} :
  forall (PointCarrier : Sort p), forall (midpoint_op : forall (A : PointCarrier), forall (B : PointCarrier), PointCarrier), forall (A : PointCarrier), forall (B : PointCarrier), PointCarrier :=
  fun PointCarrier => fun midpoint_op => fun A => fun B => midpoint_op A B

def collinear.{p} :
  forall (PointCarrier : Sort p), forall (collinear_rel : forall (A : PointCarrier), forall (B : PointCarrier), forall (C : PointCarrier), Prop), forall (A : PointCarrier), forall (B : PointCarrier), forall (C : PointCarrier), Prop :=
  fun PointCarrier => fun collinear_rel => fun A => fun B => fun C => collinear_rel A B C

def AffineLawArgs.{p,u,v} :
  forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (a : Scalar), Scalar), forall (sub : forall (a : Scalar), forall (b : Scalar), Scalar), forall (mul : forall (a : Scalar), forall (b : Scalar), Scalar), forall (le_rel : forall (a : Scalar), forall (b : Scalar), Prop), forall (Vector : Sort v), forall (vzero : Vector), forall (vadd : forall (x : Vector), forall (y : Vector), Vector), forall (vneg : forall (x : Vector), Vector), forall (smul : forall (a : Scalar), forall (x : Vector), Vector), forall (inner : forall (x : Vector), forall (y : Vector), Scalar), forall (PointCarrier : Sort p), forall (disp_op : forall (A : PointCarrier), forall (B : PointCarrier), Vector), Prop :=
  fun Scalar => fun zero => fun one => fun add => fun neg => fun sub => fun mul => fun le_rel => fun Vector => fun vzero => fun vadd => fun vneg => fun smul => fun inner => fun PointCarrier => fun disp_op => forall (P : Prop), forall (mk : forall (disp_self_law : forall (A : PointCarrier), @Eq.{v} Vector (@disp.{p,v} PointCarrier Vector disp_op A A) vzero), forall (disp_reverse_law : forall (A : PointCarrier), forall (B : PointCarrier), @Eq.{v} Vector (@disp.{p,v} PointCarrier Vector disp_op B A) (vneg (@disp.{p,v} PointCarrier Vector disp_op A B))), forall (disp_comp_law : forall (A : PointCarrier), forall (B : PointCarrier), forall (C : PointCarrier), @Eq.{v} Vector (@disp.{p,v} PointCarrier Vector disp_op A C) (vadd (@disp.{p,v} PointCarrier Vector disp_op A B) (@disp.{p,v} PointCarrier Vector disp_op B C))), forall (point_ext_of_zero_disp_law : forall (A : PointCarrier), forall (B : PointCarrier), forall (h : @Eq.{v} Vector (@disp.{p,v} PointCarrier Vector disp_op A B) vzero), @Eq.{p} PointCarrier A B), forall (dist_sq_symm_law : forall (A : PointCarrier), forall (B : PointCarrier), @Eq.{u} Scalar (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op A B) (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op B A)), forall (dist_sq_zero_iff_eq_law : forall (A : PointCarrier), forall (B : PointCarrier), forall (R : Prop), forall (mk : forall (forward : forall (h : @Eq.{u} Scalar (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op A B) zero), @Eq.{p} PointCarrier A B), forall (backward : forall (h : @Eq.{p} PointCarrier A B), @Eq.{u} Scalar (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op A B) zero), R), R), P), P

theorem disp_self.{p,u,v} :
  forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (a : Scalar), Scalar), forall (sub : forall (a : Scalar), forall (b : Scalar), Scalar), forall (mul : forall (a : Scalar), forall (b : Scalar), Scalar), forall (le_rel : forall (a : Scalar), forall (b : Scalar), Prop), forall (Vector : Sort v), forall (vzero : Vector), forall (vadd : forall (x : Vector), forall (y : Vector), Vector), forall (vneg : forall (x : Vector), Vector), forall (smul : forall (a : Scalar), forall (x : Vector), Vector), forall (inner : forall (x : Vector), forall (y : Vector), Scalar), forall (PointCarrier : Sort p), forall (disp_op : forall (A : PointCarrier), forall (B : PointCarrier), Vector), forall (law : forall (A : PointCarrier), @Eq.{v} Vector (@disp.{p,v} PointCarrier Vector disp_op A A) vzero), forall (A : PointCarrier), @Eq.{v} Vector (@disp.{p,v} PointCarrier Vector disp_op A A) vzero :=
  fun Scalar => fun zero => fun one => fun add => fun neg => fun sub => fun mul => fun le_rel => fun Vector => fun vzero => fun vadd => fun vneg => fun smul => fun inner => fun PointCarrier => fun disp_op => fun law => fun A => law A

theorem disp_reverse.{p,u,v} :
  forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (a : Scalar), Scalar), forall (sub : forall (a : Scalar), forall (b : Scalar), Scalar), forall (mul : forall (a : Scalar), forall (b : Scalar), Scalar), forall (le_rel : forall (a : Scalar), forall (b : Scalar), Prop), forall (Vector : Sort v), forall (vzero : Vector), forall (vadd : forall (x : Vector), forall (y : Vector), Vector), forall (vneg : forall (x : Vector), Vector), forall (smul : forall (a : Scalar), forall (x : Vector), Vector), forall (inner : forall (x : Vector), forall (y : Vector), Scalar), forall (PointCarrier : Sort p), forall (disp_op : forall (A : PointCarrier), forall (B : PointCarrier), Vector), forall (law : forall (A : PointCarrier), forall (B : PointCarrier), @Eq.{v} Vector (@disp.{p,v} PointCarrier Vector disp_op B A) (vneg (@disp.{p,v} PointCarrier Vector disp_op A B))), forall (A : PointCarrier), forall (B : PointCarrier), @Eq.{v} Vector (@disp.{p,v} PointCarrier Vector disp_op B A) (vneg (@disp.{p,v} PointCarrier Vector disp_op A B)) :=
  fun Scalar => fun zero => fun one => fun add => fun neg => fun sub => fun mul => fun le_rel => fun Vector => fun vzero => fun vadd => fun vneg => fun smul => fun inner => fun PointCarrier => fun disp_op => fun law => fun A => fun B => law A B

theorem disp_comp.{p,u,v} :
  forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (a : Scalar), Scalar), forall (sub : forall (a : Scalar), forall (b : Scalar), Scalar), forall (mul : forall (a : Scalar), forall (b : Scalar), Scalar), forall (le_rel : forall (a : Scalar), forall (b : Scalar), Prop), forall (Vector : Sort v), forall (vzero : Vector), forall (vadd : forall (x : Vector), forall (y : Vector), Vector), forall (vneg : forall (x : Vector), Vector), forall (smul : forall (a : Scalar), forall (x : Vector), Vector), forall (inner : forall (x : Vector), forall (y : Vector), Scalar), forall (PointCarrier : Sort p), forall (disp_op : forall (A : PointCarrier), forall (B : PointCarrier), Vector), forall (law : forall (A : PointCarrier), forall (B : PointCarrier), forall (C : PointCarrier), @Eq.{v} Vector (@disp.{p,v} PointCarrier Vector disp_op A C) (vadd (@disp.{p,v} PointCarrier Vector disp_op A B) (@disp.{p,v} PointCarrier Vector disp_op B C))), forall (A : PointCarrier), forall (B : PointCarrier), forall (C : PointCarrier), @Eq.{v} Vector (@disp.{p,v} PointCarrier Vector disp_op A C) (vadd (@disp.{p,v} PointCarrier Vector disp_op A B) (@disp.{p,v} PointCarrier Vector disp_op B C)) :=
  fun Scalar => fun zero => fun one => fun add => fun neg => fun sub => fun mul => fun le_rel => fun Vector => fun vzero => fun vadd => fun vneg => fun smul => fun inner => fun PointCarrier => fun disp_op => fun law => fun A => fun B => fun C => law A B C

theorem hypotenuse_vector_eq_sub_legs.{p,u,v} :
  forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (a : Scalar), Scalar), forall (sub : forall (a : Scalar), forall (b : Scalar), Scalar), forall (mul : forall (a : Scalar), forall (b : Scalar), Scalar), forall (le_rel : forall (a : Scalar), forall (b : Scalar), Prop), forall (Vector : Sort v), forall (vzero : Vector), forall (vadd : forall (x : Vector), forall (y : Vector), Vector), forall (vneg : forall (x : Vector), Vector), forall (smul : forall (a : Scalar), forall (x : Vector), Vector), forall (inner : forall (x : Vector), forall (y : Vector), Scalar), forall (PointCarrier : Sort p), forall (disp_op : forall (A : PointCarrier), forall (B : PointCarrier), Vector), forall (law : forall (A : PointCarrier), forall (B : PointCarrier), forall (C : PointCarrier), @Eq.{v} Vector (@disp.{p,v} PointCarrier Vector disp_op B C) (@vsub.{v} Vector vadd vneg (@disp.{p,v} PointCarrier Vector disp_op A C) (@disp.{p,v} PointCarrier Vector disp_op A B))), forall (A : PointCarrier), forall (B : PointCarrier), forall (C : PointCarrier), @Eq.{v} Vector (@disp.{p,v} PointCarrier Vector disp_op B C) (@vsub.{v} Vector vadd vneg (@disp.{p,v} PointCarrier Vector disp_op A C) (@disp.{p,v} PointCarrier Vector disp_op A B)) :=
  fun Scalar => fun zero => fun one => fun add => fun neg => fun sub => fun mul => fun le_rel => fun Vector => fun vzero => fun vadd => fun vneg => fun smul => fun inner => fun PointCarrier => fun disp_op => fun law => fun A => fun B => fun C => law A B C

theorem dist_sq_points_def.{p,u,v} :
  forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (a : Scalar), Scalar), forall (sub : forall (a : Scalar), forall (b : Scalar), Scalar), forall (mul : forall (a : Scalar), forall (b : Scalar), Scalar), forall (le_rel : forall (a : Scalar), forall (b : Scalar), Prop), forall (Vector : Sort v), forall (vzero : Vector), forall (vadd : forall (x : Vector), forall (y : Vector), Vector), forall (vneg : forall (x : Vector), Vector), forall (smul : forall (a : Scalar), forall (x : Vector), Vector), forall (inner : forall (x : Vector), forall (y : Vector), Scalar), forall (PointCarrier : Sort p), forall (disp_op : forall (A : PointCarrier), forall (B : PointCarrier), Vector), forall (A : PointCarrier), forall (B : PointCarrier), @Eq.{u} Scalar (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op A B) (@normSq.{u,v} Scalar Vector inner (@disp.{p,v} PointCarrier Vector disp_op A B)) :=
  fun Scalar => fun zero => fun one => fun add => fun neg => fun sub => fun mul => fun le_rel => fun Vector => fun vzero => fun vadd => fun vneg => fun smul => fun inner => fun PointCarrier => fun disp_op => fun A => fun B => @Eq.refl.{u} Scalar (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op A B)

theorem point_ext_of_zero_disp.{p,u,v} :
  forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (a : Scalar), Scalar), forall (sub : forall (a : Scalar), forall (b : Scalar), Scalar), forall (mul : forall (a : Scalar), forall (b : Scalar), Scalar), forall (le_rel : forall (a : Scalar), forall (b : Scalar), Prop), forall (Vector : Sort v), forall (vzero : Vector), forall (vadd : forall (x : Vector), forall (y : Vector), Vector), forall (vneg : forall (x : Vector), Vector), forall (smul : forall (a : Scalar), forall (x : Vector), Vector), forall (inner : forall (x : Vector), forall (y : Vector), Scalar), forall (PointCarrier : Sort p), forall (disp_op : forall (A : PointCarrier), forall (B : PointCarrier), Vector), forall (law : forall (A : PointCarrier), forall (B : PointCarrier), forall (h : @Eq.{v} Vector (@disp.{p,v} PointCarrier Vector disp_op A B) vzero), @Eq.{p} PointCarrier A B), forall (A : PointCarrier), forall (B : PointCarrier), forall (h : @Eq.{v} Vector (@disp.{p,v} PointCarrier Vector disp_op A B) vzero), @Eq.{p} PointCarrier A B :=
  fun Scalar => fun zero => fun one => fun add => fun neg => fun sub => fun mul => fun le_rel => fun Vector => fun vzero => fun vadd => fun vneg => fun smul => fun inner => fun PointCarrier => fun disp_op => fun law => fun A => fun B => fun h => law A B h

theorem dist_sq_symm.{p,u,v} :
  forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (a : Scalar), Scalar), forall (sub : forall (a : Scalar), forall (b : Scalar), Scalar), forall (mul : forall (a : Scalar), forall (b : Scalar), Scalar), forall (le_rel : forall (a : Scalar), forall (b : Scalar), Prop), forall (Vector : Sort v), forall (vzero : Vector), forall (vadd : forall (x : Vector), forall (y : Vector), Vector), forall (vneg : forall (x : Vector), Vector), forall (smul : forall (a : Scalar), forall (x : Vector), Vector), forall (inner : forall (x : Vector), forall (y : Vector), Scalar), forall (PointCarrier : Sort p), forall (disp_op : forall (A : PointCarrier), forall (B : PointCarrier), Vector), forall (law : forall (A : PointCarrier), forall (B : PointCarrier), @Eq.{u} Scalar (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op A B) (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op B A)), forall (A : PointCarrier), forall (B : PointCarrier), @Eq.{u} Scalar (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op A B) (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op B A) :=
  fun Scalar => fun zero => fun one => fun add => fun neg => fun sub => fun mul => fun le_rel => fun Vector => fun vzero => fun vadd => fun vneg => fun smul => fun inner => fun PointCarrier => fun disp_op => fun law => fun A => fun B => law A B

theorem dist_sq_zero_iff_eq.{p,u,v} :
  forall (Scalar : Sort u), forall (zero : Scalar), forall (one : Scalar), forall (add : forall (a : Scalar), forall (b : Scalar), Scalar), forall (neg : forall (a : Scalar), Scalar), forall (sub : forall (a : Scalar), forall (b : Scalar), Scalar), forall (mul : forall (a : Scalar), forall (b : Scalar), Scalar), forall (le_rel : forall (a : Scalar), forall (b : Scalar), Prop), forall (Vector : Sort v), forall (vzero : Vector), forall (vadd : forall (x : Vector), forall (y : Vector), Vector), forall (vneg : forall (x : Vector), Vector), forall (smul : forall (a : Scalar), forall (x : Vector), Vector), forall (inner : forall (x : Vector), forall (y : Vector), Scalar), forall (PointCarrier : Sort p), forall (disp_op : forall (A : PointCarrier), forall (B : PointCarrier), Vector), forall (law : forall (A : PointCarrier), forall (B : PointCarrier), forall (R : Prop), forall (mk : forall (forward : forall (h : @Eq.{u} Scalar (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op A B) zero), @Eq.{p} PointCarrier A B), forall (backward : forall (h : @Eq.{p} PointCarrier A B), @Eq.{u} Scalar (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op A B) zero), R), R), forall (A : PointCarrier), forall (B : PointCarrier), forall (R : Prop), forall (mk : forall (forward : forall (h : @Eq.{u} Scalar (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op A B) zero), @Eq.{p} PointCarrier A B), forall (backward : forall (h : @Eq.{p} PointCarrier A B), @Eq.{u} Scalar (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op A B) zero), R), R :=
  fun Scalar => fun zero => fun one => fun add => fun neg => fun sub => fun mul => fun le_rel => fun Vector => fun vzero => fun vadd => fun vneg => fun smul => fun inner => fun PointCarrier => fun disp_op => fun law => fun A => fun B => fun (R : Prop) => fun (mk : forall (forward : forall (h : @Eq.{u} Scalar (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op A B) zero), @Eq.{p} PointCarrier A B), forall (backward : forall (h : @Eq.{p} PointCarrier A B), @Eq.{u} Scalar (@distSqPoints.{p,u,v} Scalar Vector inner PointCarrier disp_op A B) zero), R) => law A B R mk