Към NPA

Модул

Mathlib.Algebra.Square

npa-mathlib

Пакети

2

Модули

63

Теореми

750

Декларации

1016

Допълнителни данни извън обхвата на проверката

Прегледайте изходния код и допълнителните данни, за да разберете съдържанието. Доказателството се потвърждава чрез каноничните данни от сертификата и резултата от проверката.

Теореми

11

Дефиниции

2

Индуктивни типове

0

Аксиоми

0

Декларации

Хешове

Хеш на изходния код
sha256:516c0677168b95ec3d47befd07c2823effd4ac76c307270458973e2d85ad552e
Хеш на файла със сертификата
sha256:384ae8e01a55ce066f1bc1cb41759c88f7c5480e1cce055f5520c89e757547b6
Хеш на експортираните данни
sha256:787b772cee6d3eeb9d8a533e2445dd26d55accc8ee8fc370ff1bac46ff420c18
Хеш на отчета за аксиомите
sha256:e73446550ebd2b8f59300fca0b3c3199e0a7a6f7722008c664f50b8a67fd00b9
Хеш на сертификата
sha256:f8880c76da58811dbe8c8d221e269793a577ae6332f30e2e22745b267f9bd926

Изходен код

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