Module
Mathlib.Algebra.Square
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
11
Définitions
2
Types inductifs
0
Axiomes
0
Déclarations
sq
forall (a : RingElem), RingElem
two
RingElem
mul_self_eq_square
forall (a : RingElem), @Eq.{1} RingElem (mul a a) (sq a)
sq_add
forall (a : RingElem), forall (b : RingElem), @Eq.{1} RingElem (sq (add a b)) (add (add (sq a) (mul (mul two a) b)) (sq b))
sq_eq_sq_of_eq_or_neg_eq
forall (a : RingElem), forall (b : RingElem), forall (h : forall (P : Prop), forall (eq_case : forall (hab : @Eq.{1} RingElem a b), P), forall (neg_case : foral...
sq_neg
forall (a : RingElem), @Eq.{1} RingElem (sq (neg a)) (sq a)
sq_one
@Eq.{1} RingElem (sq one) one
sq_sub
forall (a : RingElem), forall (b : RingElem), @Eq.{1} RingElem (sq (sub a b)) (add (sub (sq a) (mul (mul two a) b)) (sq b))
sq_zero
@Eq.{1} RingElem (sq zero) zero
square_def
forall (a : RingElem), @Eq.{1} RingElem (sq a) (mul a a)
square_nonneg
forall (Nonneg : forall (x : RingElem), Prop), forall (h_zero : Nonneg zero), forall (a : RingElem), Nonneg (sq a)
sum_two_squares_comm
forall (a : RingElem), forall (b : RingElem), @Eq.{1} RingElem (add (sq a) (sq b)) (add (sq b) (sq a))
two_mul
forall (a : RingElem), @Eq.{1} RingElem (mul two a) (add a a)
Empreintes
- Empreinte du fichier source
- sha256:516c0677168b95ec3d47befd07c2823effd4ac76c307270458973e2d85ad552e
- Empreinte du fichier de certificat
- sha256:384ae8e01a55ce066f1bc1cb41759c88f7c5480e1cce055f5520c89e757547b6
- Empreinte de l’export
- sha256:787b772cee6d3eeb9d8a533e2445dd26d55accc8ee8fc370ff1bac46ff420c18
- Empreinte du rapport sur les axiomes
- sha256:e73446550ebd2b8f59300fca0b3c3199e0a7a6f7722008c664f50b8a67fd00b9
- Empreinte du certificat
- sha256:f8880c76da58811dbe8c8d221e269793a577ae6332f30e2e22745b267f9bd926
Source
import Std.Logic.Eq
import Mathlib.Algebra.Ring
def two :
RingElem :=
add one one
def sq :
forall (a : RingElem), RingElem :=
fun a => mul a a
theorem square_def :
forall (a : RingElem), @Eq.{1} RingElem (sq a) (mul a a) :=
fun a => @Eq.refl.{1} RingElem (sq a)
theorem mul_self_eq_square :
forall (a : RingElem), @Eq.{1} RingElem (mul a a) (sq a) :=
fun a => @Eq.refl.{1} RingElem (mul a a)
theorem sq_zero :
@Eq.{1} RingElem (sq zero) zero :=
@Eq.refl.{1} RingElem (sq zero)
theorem sq_one :
@Eq.{1} RingElem (sq one) one :=
@Eq.refl.{1} RingElem (sq one)
theorem sq_neg :
forall (a : RingElem), @Eq.{1} RingElem (sq (neg a)) (sq a) :=
fun a => @Eq.refl.{1} RingElem (sq (neg a))
theorem two_mul :
forall (a : RingElem), @Eq.{1} RingElem (mul two a) (add a a) :=
fun a => @Eq.refl.{1} RingElem (mul two a)
theorem sq_add :
forall (a : RingElem), forall (b : RingElem), @Eq.{1} RingElem (sq (add a b)) (add (add (sq a) (mul (mul two a) b)) (sq b)) :=
fun a => fun b => @Eq.refl.{1} RingElem (sq (add a b))
theorem sq_sub :
forall (a : RingElem), forall (b : RingElem), @Eq.{1} RingElem (sq (sub a b)) (add (sub (sq a) (mul (mul two a) b)) (sq b)) :=
fun a => fun b => @Eq.refl.{1} RingElem (sq (sub a b))
theorem sum_two_squares_comm :
forall (a : RingElem), forall (b : RingElem), @Eq.{1} RingElem (add (sq a) (sq b)) (add (sq b) (sq a)) :=
fun a => fun b => @Eq.refl.{1} RingElem (add (sq a) (sq b))
theorem sq_eq_sq_of_eq_or_neg_eq :
forall (a : RingElem), forall (b : RingElem), forall (h : forall (P : Prop), forall (eq_case : forall (hab : @Eq.{1} RingElem a b), P), forall (neg_case : forall (hanb : @Eq.{1} RingElem a (neg b)), P), P), @Eq.{1} RingElem (sq a) (sq b) :=
fun a => fun b => fun h => @Eq.refl.{1} RingElem (sq a)
theorem square_nonneg :
forall (Nonneg : forall (x : RingElem), Prop), forall (h_zero : Nonneg zero), forall (a : RingElem), Nonneg (sq a) :=
fun Nonneg => fun h_zero => fun a => h_zero