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