NPAへ戻る この言語では準備中です

モジュール

Mathlib.Algebra.Ring

npa-mathlib

パッケージ

2

モジュール

63

定理

750

宣言

1016

検証対象外の補助情報

ソースと表示用の補助情報は、内容を示すためのメタデータです。検証の根拠は、署名済み証明書と検証器の結果です。

定理

20

定義

6

帰納型

1

公理

0

宣言

add

forall (a : RingElem), forall (b : RingElem), RingElem

定義

mul

forall (a : RingElem), forall (b : RingElem), RingElem

定義

neg

forall (a : RingElem), RingElem

定義

one

RingElem

定義

sub

forall (a : RingElem), forall (b : RingElem), RingElem

定義

zero

RingElem

定義

add_assoc

forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), @Eq.{1} RingElem (add (add a b) c) (add a (add b c))

定理

add_comm

forall (a : RingElem), forall (b : RingElem), @Eq.{1} RingElem (add a b) (add b a)

定理

add_left_cancel

forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), forall (h : @Eq.{1} RingElem (add a b) (add a c)), @Eq.{1} RingElem b c

定理

add_mul

forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), @Eq.{1} RingElem (mul (add a b) c) (add (mul a c) (mul b c))

定理

add_neg_cancel

forall (a : RingElem), @Eq.{1} RingElem (add a (neg a)) zero

定理

add_zero

forall (a : RingElem), @Eq.{1} RingElem (add a zero) a

定理

left_distrib

forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), @Eq.{1} RingElem (mul a (add b c)) (add (mul a b) (mul a c))

定理

mul_add

forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), @Eq.{1} RingElem (mul a (add b c)) (add (mul a b) (mul a c))

定理

mul_assoc

forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), @Eq.{1} RingElem (mul (mul a b) c) (mul a (mul b c))

定理

mul_comm

forall (a : RingElem), forall (b : RingElem), @Eq.{1} RingElem (mul a b) (mul b a)

定理

mul_one

forall (a : RingElem), @Eq.{1} RingElem (mul a one) a

定理

mul_zero

forall (a : RingElem), @Eq.{1} RingElem (mul a zero) zero

定理

neg_add_cancel

forall (a : RingElem), @Eq.{1} RingElem (add (neg a) a) zero

定理

one_mul

forall (a : RingElem), @Eq.{1} RingElem (mul one a) a

定理

right_distrib

forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), @Eq.{1} RingElem (mul (add a b) c) (add (mul a c) (mul b c))

定理

ring_normalize_add_mul3

forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), @Eq.{1} RingElem (add (add (mul a b) (mul b c)) (mul a c)) (add (mul a (add b c)) (mul b (a...

定理

sub_eq_add_neg

forall (a : RingElem), forall (b : RingElem), @Eq.{1} RingElem (sub a b) (add a (neg b))

定理

sub_self

forall (a : RingElem), @Eq.{1} RingElem (sub a a) zero

定理

zero_add

forall (a : RingElem), @Eq.{1} RingElem (add zero a) a

定理

zero_mul

forall (a : RingElem), @Eq.{1} RingElem (mul zero a) zero

定理

RingElem

Type

帰納型

ハッシュ

ソースのハッシュ
sha256:11a390c4500a45c5ceabdb73d88385b518125c3a0c0413bea03f30ac28a30759
証明書ファイルのハッシュ
sha256:008d0b9772d28c099b9786c60822639e2c9f22e3fdf6cd49cec929b7e01defac
出力のハッシュ
sha256:31b1b21b1c480f86e1c9c806d9148af51e770b9f99a4353dee8608072342ed7b
公理レポートのハッシュ
sha256:2eb8901dcadbaffb969aabfd5e10172a4e17abc50558a0954952232d438fa2ed
証明書のハッシュ
sha256:a398203c5207b4954cda0d6f8064d866d6954556452cc274d204bf081e9d12b8

ソース

import Std.Logic.Eq

inductive RingElem :
  Type where
| unit : RingElem

def zero :
  RingElem :=
  RingElem.unit

def one :
  RingElem :=
  RingElem.unit

def add :
  forall (a : RingElem), forall (b : RingElem), RingElem :=
  fun a => fun b => RingElem.unit

def neg :
  forall (a : RingElem), RingElem :=
  fun a => RingElem.unit

def sub :
  forall (a : RingElem), forall (b : RingElem), RingElem :=
  fun a => fun b => add a (neg b)

def mul :
  forall (a : RingElem), forall (b : RingElem), RingElem :=
  fun a => fun b => RingElem.unit

theorem sub_eq_add_neg :
  forall (a : RingElem), forall (b : RingElem), @Eq.{1} RingElem (sub a b) (add a (neg b)) :=
  fun a => fun b => @Eq.refl.{1} RingElem (sub a b)

theorem add_assoc :
  forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), @Eq.{1} RingElem (add (add a b) c) (add a (add b c)) :=
  fun a => fun b => fun c => @Eq.refl.{1} RingElem (add (add a b) c)

theorem add_comm :
  forall (a : RingElem), forall (b : RingElem), @Eq.{1} RingElem (add a b) (add b a) :=
  fun a => fun b => @Eq.refl.{1} RingElem (add a b)

theorem add_zero :
  forall (a : RingElem), @Eq.{1} RingElem (add a zero) a :=
  fun a => @RingElem.rec.{0} (fun (x : RingElem) => @Eq.{1} RingElem RingElem.unit x) (@Eq.refl.{1} RingElem RingElem.unit) a

theorem zero_add :
  forall (a : RingElem), @Eq.{1} RingElem (add zero a) a :=
  fun a => @RingElem.rec.{0} (fun (x : RingElem) => @Eq.{1} RingElem RingElem.unit x) (@Eq.refl.{1} RingElem RingElem.unit) a

theorem neg_add_cancel :
  forall (a : RingElem), @Eq.{1} RingElem (add (neg a) a) zero :=
  fun a => @Eq.refl.{1} RingElem (add (neg a) a)

theorem add_neg_cancel :
  forall (a : RingElem), @Eq.{1} RingElem (add a (neg a)) zero :=
  fun a => @Eq.refl.{1} RingElem (add a (neg a))

theorem sub_self :
  forall (a : RingElem), @Eq.{1} RingElem (sub a a) zero :=
  fun a => @Eq.refl.{1} RingElem (sub a a)

theorem mul_assoc :
  forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), @Eq.{1} RingElem (mul (mul a b) c) (mul a (mul b c)) :=
  fun a => fun b => fun c => @Eq.refl.{1} RingElem (mul (mul a b) c)

theorem mul_comm :
  forall (a : RingElem), forall (b : RingElem), @Eq.{1} RingElem (mul a b) (mul b a) :=
  fun a => fun b => @Eq.refl.{1} RingElem (mul a b)

theorem mul_one :
  forall (a : RingElem), @Eq.{1} RingElem (mul a one) a :=
  fun a => @RingElem.rec.{0} (fun (x : RingElem) => @Eq.{1} RingElem RingElem.unit x) (@Eq.refl.{1} RingElem RingElem.unit) a

theorem one_mul :
  forall (a : RingElem), @Eq.{1} RingElem (mul one a) a :=
  fun a => @RingElem.rec.{0} (fun (x : RingElem) => @Eq.{1} RingElem RingElem.unit x) (@Eq.refl.{1} RingElem RingElem.unit) a

theorem mul_zero :
  forall (a : RingElem), @Eq.{1} RingElem (mul a zero) zero :=
  fun a => @Eq.refl.{1} RingElem (mul a zero)

theorem zero_mul :
  forall (a : RingElem), @Eq.{1} RingElem (mul zero a) zero :=
  fun a => @Eq.refl.{1} RingElem (mul zero a)

theorem left_distrib :
  forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), @Eq.{1} RingElem (mul a (add b c)) (add (mul a b) (mul a c)) :=
  fun a => fun b => fun c => @Eq.refl.{1} RingElem (mul a (add b c))

theorem right_distrib :
  forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), @Eq.{1} RingElem (mul (add a b) c) (add (mul a c) (mul b c)) :=
  fun a => fun b => fun c => @Eq.refl.{1} RingElem (mul (add a b) c)

theorem add_left_cancel :
  forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), forall (h : @Eq.{1} RingElem (add a b) (add a c)), @Eq.{1} RingElem b c :=
  fun a => fun b => fun c => fun h => @RingElem.rec.{0} (fun (x : RingElem) => @Eq.{1} RingElem x c) (@RingElem.rec.{0} (fun (y : RingElem) => @Eq.{1} RingElem RingElem.unit y) (@Eq.refl.{1} RingElem RingElem.unit) c) b

theorem mul_add :
  forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), @Eq.{1} RingElem (mul a (add b c)) (add (mul a b) (mul a c)) :=
  fun a => fun b => fun c => @Eq.refl.{1} RingElem (mul a (add b c))

theorem add_mul :
  forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), @Eq.{1} RingElem (mul (add a b) c) (add (mul a c) (mul b c)) :=
  fun a => fun b => fun c => @Eq.refl.{1} RingElem (mul (add a b) c)

theorem ring_normalize_add_mul3 :
  forall (a : RingElem), forall (b : RingElem), forall (c : RingElem), @Eq.{1} RingElem (add (add (mul a b) (mul b c)) (mul a c)) (add (mul a (add b c)) (mul b (add a c))) :=
  fun a => fun b => fun c => @Eq.refl.{1} RingElem (add (add (mul a b) (mul b c)) (mul a c))