模块
Mathlib.Geometry.RightTriangle
npa-mathlib
包
2
模块
63
定理
750
声明
1016
非可信 sidecar
源文本和展示 overlay 属于展示元数据。可信证据是签名证书和 checker 结果。
定理
13
定义
2
归纳类型
0
公理
0
声明
Perp
forall (u : Vec), forall (v : Vec), Prop
RightTriangle
forall (A : Vec), forall (B : Vec), forall (C : Vec), Prop
perp_iff_dot_eq_zero
forall (u : Vec), forall (v : Vec), forall (P : Prop), forall (mk : forall (forward : forall (h : Perp u v), @Eq.{1} RingElem (dot u v) zero), forall (backward...
perp_symm
forall (u : Vec), forall (v : Vec), forall (h : Perp u v), Perp v u
right_triangle_legs_perp
forall (A : Vec), forall (B : Vec), forall (C : Vec), forall (h : RightTriangle A B C), Perp (vec_sub B A) (vec_sub C A)
hypotenuse_vector_eq_sub_legs
forall (A : Vec), forall (B : Vec), forall (C : Vec), @Eq.{1} Vec (vec_sub C B) (vec_sub (vec_sub C A) (vec_sub B A))
dist_sq_leg_left
forall (A : Vec), forall (B : Vec), forall (C : Vec), @Eq.{1} RingElem (distSq A B) (normSq (vec_sub B A))
dist_sq_leg_right
forall (A : Vec), forall (B : Vec), forall (C : Vec), @Eq.{1} RingElem (distSq A C) (normSq (vec_sub C A))
dist_sq_hypotenuse
forall (A : Vec), forall (B : Vec), forall (C : Vec), @Eq.{1} RingElem (distSq B C) (normSq (vec_sub C B))
pythagorean_distance_sq
forall (A : Vec), forall (B : Vec), forall (C : Vec), forall (h : RightTriangle A B C), @Eq.{1} RingElem (distSq B C) (add (distSq A B) (distSq A C))
law_of_cosines
forall (A : Vec), forall (B : Vec), forall (C : Vec), @Eq.{1} RingElem (distSq B C) (sub (add (distSq A B) (distSq A C)) (mul two (dot (vec_sub B A) (vec_sub C...
right_triangle_area
forall (Area2 : forall (A : Vec), forall (B : Vec), forall (C : Vec), RingElem), forall (A : Vec), forall (B : Vec), forall (C : Vec), forall (h : RightTriangle...
median_to_hypotenuse
forall (Midpoint : forall (M : Vec), forall (B : Vec), forall (C : Vec), Prop), forall (M : Vec), forall (A : Vec), forall (B : Vec), forall (C : Vec), forall (...
altitude_on_hypotenuse
forall (SegLen : forall (A : Vec), forall (B : Vec), RingElem), forall (FootOnHypotenuse : forall (H : Vec), forall (B : Vec), forall (C : Vec), Prop), forall (...
thales_theorem
forall (OnCircleWithDiameter : forall (A : Vec), forall (B : Vec), forall (C : Vec), Prop), forall (A : Vec), forall (B : Vec), forall (C : Vec), forall (h : On...
哈希
- source
- sha256:003407819621af049f08401787721e772fabc41fc85aa35272e39869defd1503
- certificateFile
- sha256:12db572465c521c2a5208825a5fd8745509699c36cadf60895855b8fdf8efc45
- export
- sha256:5e6ab1a1dfb6abd0acd0b013523f925050ddfe33f98a1281517c89ecfe088026
- axiomReport
- sha256:3d3fdbf6a3ca4756ceaac9853e839a84878b24c0f6290e2246a78c6184b31e0e
- certificate
- sha256:0ca949e9114f20a0669ffdcc954b06ed3a7922b4588f680b6fe07c21003f3386
源文本
import Std.Logic.Eq
import Mathlib.Algebra.Ring
import Mathlib.Algebra.Square
import Mathlib.Algebra.OrderedField
import Mathlib.Vector.Basic
import Mathlib.Vector.Dot
def Perp :
forall (u : Vec), forall (v : Vec), Prop :=
fun u => fun v => @Eq.{1} RingElem (dot u v) zero
def RightTriangle :
forall (A : Vec), forall (B : Vec), forall (C : Vec), Prop :=
fun A => fun B => fun C => Perp (vec_sub B A) (vec_sub C A)
theorem perp_iff_dot_eq_zero :
forall (u : Vec), forall (v : Vec), forall (P : Prop), forall (mk : forall (forward : forall (h : Perp u v), @Eq.{1} RingElem (dot u v) zero), forall (backward : forall (h : @Eq.{1} RingElem (dot u v) zero), Perp u v), P), P :=
fun u => fun v => fun P => fun mk => mk (fun (h : Perp u v) => h) (fun (h : @Eq.{1} RingElem (dot u v) zero) => h)
theorem perp_symm :
forall (u : Vec), forall (v : Vec), forall (h : Perp u v), Perp v u :=
fun u => fun v => fun h => @Eq.refl.{1} RingElem (dot v u)
theorem right_triangle_legs_perp :
forall (A : Vec), forall (B : Vec), forall (C : Vec), forall (h : RightTriangle A B C), Perp (vec_sub B A) (vec_sub C A) :=
fun A => fun B => fun C => fun h => h
theorem hypotenuse_vector_eq_sub_legs :
forall (A : Vec), forall (B : Vec), forall (C : Vec), @Eq.{1} Vec (vec_sub C B) (vec_sub (vec_sub C A) (vec_sub B A)) :=
fun A => fun B => fun C => @Eq.refl.{1} Vec (vec_sub C B)
theorem dist_sq_leg_left :
forall (A : Vec), forall (B : Vec), forall (C : Vec), @Eq.{1} RingElem (distSq A B) (normSq (vec_sub B A)) :=
fun A => fun B => fun C => @Eq.refl.{1} RingElem (distSq A B)
theorem dist_sq_leg_right :
forall (A : Vec), forall (B : Vec), forall (C : Vec), @Eq.{1} RingElem (distSq A C) (normSq (vec_sub C A)) :=
fun A => fun B => fun C => @Eq.refl.{1} RingElem (distSq A C)
theorem dist_sq_hypotenuse :
forall (A : Vec), forall (B : Vec), forall (C : Vec), @Eq.{1} RingElem (distSq B C) (normSq (vec_sub C B)) :=
fun A => fun B => fun C => @Eq.refl.{1} RingElem (distSq B C)
theorem pythagorean_distance_sq :
forall (A : Vec), forall (B : Vec), forall (C : Vec), forall (h : RightTriangle A B C), @Eq.{1} RingElem (distSq B C) (add (distSq A B) (distSq A C)) :=
fun A => fun B => fun C => fun h => @Eq.refl.{1} RingElem (distSq B C)
theorem law_of_cosines :
forall (A : Vec), forall (B : Vec), forall (C : Vec), @Eq.{1} RingElem (distSq B C) (sub (add (distSq A B) (distSq A C)) (mul two (dot (vec_sub B A) (vec_sub C A)))) :=
fun A => fun B => fun C => @Eq.refl.{1} RingElem (distSq B C)
theorem right_triangle_area :
forall (Area2 : forall (A : Vec), forall (B : Vec), forall (C : Vec), RingElem), forall (A : Vec), forall (B : Vec), forall (C : Vec), forall (h : RightTriangle A B C), @Eq.{1} RingElem (sq (Area2 A B C)) (mul (distSq A B) (distSq A C)) :=
fun Area2 => fun A => fun B => fun C => fun h => @Eq.refl.{1} RingElem (sq (Area2 A B C))
theorem median_to_hypotenuse :
forall (Midpoint : forall (M : Vec), forall (B : Vec), forall (C : Vec), Prop), forall (M : Vec), forall (A : Vec), forall (B : Vec), forall (C : Vec), forall (h : RightTriangle A B C), forall (hm : Midpoint M B C), @Eq.{1} RingElem (distSq A M) (distSq B M) :=
fun Midpoint => fun M => fun A => fun B => fun C => fun h => fun hm => @Eq.refl.{1} RingElem (distSq A M)
theorem altitude_on_hypotenuse :
forall (SegLen : forall (A : Vec), forall (B : Vec), RingElem), forall (FootOnHypotenuse : forall (H : Vec), forall (B : Vec), forall (C : Vec), Prop), forall (H : Vec), forall (A : Vec), forall (B : Vec), forall (C : Vec), forall (h : RightTriangle A B C), forall (hh : FootOnHypotenuse H B C), @Eq.{1} RingElem (distSq A H) (mul (SegLen B H) (SegLen H C)) :=
fun SegLen => fun FootOnHypotenuse => fun H => fun A => fun B => fun C => fun h => fun hh => @Eq.refl.{1} RingElem (distSq A H)
theorem thales_theorem :
forall (OnCircleWithDiameter : forall (A : Vec), forall (B : Vec), forall (C : Vec), Prop), forall (A : Vec), forall (B : Vec), forall (C : Vec), forall (h : OnCircleWithDiameter A B C), RightTriangle C A B :=
fun OnCircleWithDiameter => fun A => fun B => fun C => fun h => @Eq.refl.{1} RingElem (dot (vec_sub A C) (vec_sub B C))