mathlib documentation

non-mathlib.early_version

inductive mynat  :
Type
theorem succ_eq (a b : mynat) :
a = ba.mysucc = b.mysucc
def myadd  :
mynatmynatmynat
Equations
theorem add_zero (n : mynat) :
theorem add_succ (n m : mynat) :
theorem zero_add (n : mynat) :
theorem succ_add (n m : mynat) :
theorem add_assoc (a b c : mynat) :
myadd (myadd a b) c = myadd a (myadd b c)
theorem add_comm (a b : mynat) :
myadd a b = myadd b a
theorem add_cancel_a (a b c : mynat) :
myadd b a = myadd c ab = c
theorem add_cancel_a_rev (a b c : mynat) :
myadd a b = myadd a cb = c
theorem add_cancel_b (a b c : mynat) :
b = cmyadd b a = myadd c a
theorem add_comm_in_tree (a b c d : mynat) :
myadd (myadd a b) (myadd c d) = myadd (myadd a c) (myadd b d)
theorem add_combine_eq (a b c d : mynat) :
a = bc = dmyadd a c = myadd b d
def mymul  :
mynatmynatmynat
Equations
theorem one_mul_eq (n : mynat) :
theorem mul_one_eq (n : mynat) :
theorem mul_succ (n m : mynat) :
mymul n.mysucc m = myadd (mymul n m) m
theorem succ_mul (n m : mynat) :
mymul n m.mysucc = myadd (mymul n m) n
theorem mul_comm (n m : mynat) :
mymul n m = mymul m n
theorem mul_add (t a b : mynat) :
mymul t (myadd a b) = myadd (mymul t a) (mymul t b)
theorem mul_assoc (a b c : mynat) :
mymul (mymul a b) c = mymul a (mymul b c)
theorem mul_add_distrib (a b c : mynat) :
mymul (myadd a b) c = myadd (mymul a c) (mymul b c)
theorem mul_add_distrib_alt (a b c : mynat) :
mymul a (myadd b c) = myadd (mymul a b) (mymul a c)
theorem mul_add_distrib_rev (a b c : mynat) :
myadd (mymul a b) (mymul a c) = mymul (myadd b c) a
theorem mul_result_zero (a b c : mynat) :
a = c.mysuccmymul a b = mynat.zerob = mynat.zero
theorem mul_cancel (a b c : mynat) :
mymul a c.mysucc = mymul b c.mysucca = b
theorem mul_zero_collapse (a b c : mynat) :
¬a = bmymul a c = mymul b cc = mynat.zero
theorem add_self (a b : mynat) :
myadd a a = myadd b ba = b
theorem add_self_inv (a b : mynat) :
¬a = b¬myadd a a = myadd b b
theorem mul_weird_sub_a (a b c d : mynat) :
(∃ (e : mynat), d = myadd c e.mysucc)myadd (mymul a c) (mymul b d) = myadd (mymul b c) (mymul a d)a = b
theorem difference_exists (a b : mynat) :
(∃ (c : mynat), myadd a c = b) ∃ (c : mynat), a = myadd b c
theorem ne_implies_nonzero_diff (a b : mynat) :
a b((∃ (c : mynat), b = myadd a c.mysucc) ∃ (c : mynat), a = myadd b c.mysucc)
theorem mul_weird_sub (a b c d : mynat) :
c dmyadd (mymul a c) (mymul b d) = myadd (mymul b c) (mymul a d)a = b
inductive myint  :
Type
def iszero  :
myint → Prop
Equations
def int_equal  :
myintmyint → Prop
Equations
theorem int_zeros_eq (a b : myint) :
iszero aiszero bint_equal a b
theorem int_zeros_only_eq (a b : myint) :
iszero aint_equal a biszero b
theorem int_zeros_only_eq_rev (a b : myint) :
iszero aint_equal b aiszero b
theorem int_equal_refl (a : myint) :
theorem int_eq_comm (a b : myint) :
int_equal a bint_equal b a
theorem int_eq_comm_double (a b : myint) :
theorem int_eq_trans (a b c : myint) :
int_equal a bint_equal b cint_equal a c
def int_add  :
myintmyintmyint
Equations
theorem add_zero_int (a b : myint) :
iszero aint_equal b (int_add a b)
theorem add_zero_int_alt (a b : myint) :
iszero aint_equal (int_add a b) b
theorem add_comm_int (a b : myint) :
theorem add_comm_int_rw (a b : myint) :
int_add a b = int_add b a
theorem add_eq (a b c : myint) :
theorem add_assoc_int (a b c : myint) :
theorem add_assoc_int_rw (a b c : myint) :
int_add (int_add a b) c = int_add a (int_add b c)
theorem add_sub_int (a b c d : myint) :
int_equal a bint_equal (int_add a c) dint_equal (int_add b c) d
theorem int_add_self_nonzero (a : myint) :
def int_mul  :
myintmyintmyint
Equations
theorem mul_comm_int (a b : myint) :
theorem mul_comm_int_rw (a b : myint) :
int_mul a b = int_mul b a
theorem add_helper_1 (a b c : mynat) :
myadd (myadd a b) c = myadd (myadd a c) b
theorem add_helper_2 (a b c d : mynat) :
myadd a (myadd (myadd b c) d) = myadd b (myadd (myadd a c) d)
theorem mul_eq (a b c : myint) :
int_equal b cint_equal (int_mul a b) (int_mul a c)
theorem mul_eq_alt (a b c : myint) :
int_equal b cint_equal (int_mul b a) (int_mul c a)
@[simp]
theorem mul_assoc_int (a b c : myint) :
theorem mul_assoc_int_rw (a b c : myint) :
int_mul (int_mul a b) c = int_mul a (int_mul b c)
theorem mul_tree_swap_int_rw (a b c d : myint) :
int_mul (int_mul a b) (int_mul c d) = int_mul (int_mul a c) (int_mul b d)
theorem mul_distrib_int (a b c : myint) :
theorem mul_distrib_int_rw (a b c : myint) :
int_mul (int_add a b) c = int_add (int_mul a c) (int_mul b c)
theorem mul_distrib_int_rw_alt (a b c : myint) :
int_mul a (int_add b c) = int_add (int_mul a b) (int_mul a c)
theorem mul_zero_int (a b : myint) :
iszero aiszero (int_mul a b)
theorem mul_zero_int_alt (a b : myint) :
iszero aiszero (int_mul b a)
theorem mul_result_zero_int (a b : myint) :
¬iszero aiszero (int_mul a b)iszero b
theorem mul_result_zero_int_rev (a b : myint) :
¬iszero biszero (int_mul a b)iszero a
theorem mul_one_int (a : myint) :
theorem mul_one_int_rw (a : myint) :
theorem mul_comm_zero_int (a b : myint) :
theorem mul_sub_int (a b c d : myint) :
int_equal a bint_equal (int_mul a c) dint_equal (int_mul b c) d
theorem multiply_two_equalities_int (a b c d : myint) :
int_equal a bint_equal c dint_equal (int_mul a c) (int_mul b d)
theorem stupid (a b : mynat) :
a = b = (b = a)
theorem mul_cancel_int (a b c : myint) :
¬iszero bint_equal (int_mul a b) (int_mul c b)int_equal a c
theorem mul_cancel_int_alt (a b c : myint) :
¬iszero aint_equal (int_mul a b) (int_mul a c)int_equal b c
theorem mul_nonzero_int (a b : myint) :
¬iszero a¬iszero b¬iszero (int_mul a b)
theorem mul_sub_in_add_int (a b c d e : myint) :
int_equal a bint_equal (int_add (int_mul a c) d) eint_equal (int_add (int_mul b c) d) e
def negative  :
Equations
def negative_eq (a b : myint) :
def mul_negative (a b : myint) :
inductive myrat  :
Type
def defined  :
myrat → Prop
Equations
def iszero_rat  :
myrat → Prop
Equations
theorem undef_iszero (a : myrat) :
def rat_eq  :
myratmyrat → Prop
Equations
theorem undef_eq (a b : myrat) :
¬defined arat_eq a b
theorem rat_eq_refl (a : myrat) :
rat_eq a a
theorem rat_eq_comm (a b : myrat) :
rat_eq a brat_eq b a
theorem eq_undef (a b : myrat) :
¬defined brat_eq a b
theorem zeroes_only_eq_rat (a b : myrat) :
defined arat_eq a biszero_rat aiszero_rat b
theorem rat_eq_trans (a b c : myrat) :
defined brat_eq a brat_eq b crat_eq a c
def rat_mul  :
myratmyratmyrat
Equations
theorem rat_mul_comm (a b : myrat) :
rat_mul a b = rat_mul b a
theorem rat_mul_def (a b : myrat) :
defined adefined bdefined (rat_mul a b)
theorem rat_mul_undef (a b : myrat) :
theorem rat_undef_mul (a b : myrat) :
theorem rat_mul_zero (a b : myrat) :
theorem rat_mul_assoc (a b c : myrat) :
rat_mul (rat_mul a b) c = rat_mul a (rat_mul b c)
theorem rat_mul_eq (a b c : myrat) :
rat_eq b crat_eq (rat_mul a b) (rat_mul a c)
theorem mul_sub_rat (a b c d : myrat) :
defined arat_eq a brat_eq (rat_mul a c) drat_eq (rat_mul b c) d
theorem mul_eq_rat (a b c : myrat) :
rat_eq a brat_eq (rat_mul a c) (rat_mul b c)
theorem mul_eq_rat_alt (a b c : myrat) :
rat_eq a brat_eq (rat_mul c a) (rat_mul c b)
def rat_add  :
myratmyratmyrat
Equations
theorem rat_add_undef (a b : myrat) :
theorem rat_add_def (a b : myrat) :
defined adefined bdefined (rat_add a b)
theorem rat_add_zero (a b : myrat) :
iszero_rat arat_eq (rat_add a b) b
theorem add_eq_rat (a b c : myrat) :
rat_eq a brat_eq (rat_add a c) (rat_add b c)
theorem rat_add_comm (a b : myrat) :
rat_add a b = rat_add b a
theorem rat_add_assoc (a b c : myrat) :
rat_add a (rat_add b c) = rat_add (rat_add a b) c
theorem add_sub_rat (a b c d : myrat) :
defined arat_eq a brat_eq (rat_add a c) drat_eq (rat_add b c) d
theorem add_sub_rat_alt (a b c d : myrat) :
defined arat_eq a brat_eq (rat_add c a) drat_eq (rat_add c b) d
theorem rat_mul_one (a b : myrat) :
theorem rat_mul_one_rw (a : myrat) :
theorem rat_mul_distrib (a b c : myrat) :
rat_eq (rat_mul (rat_add a b) c) (rat_add (rat_mul a c) (rat_mul b c))
theorem rat_mul_distrib_inv (a b c : myrat) :
rat_eq (rat_add (rat_mul a c) (rat_mul b c)) (rat_mul (rat_add a b) c)
theorem rat_mul_distrib_alt (a b c : myrat) :
rat_eq (rat_mul a (rat_add b c)) (rat_add (rat_mul a b) (rat_mul a c))
theorem rat_one_mul (a b : myrat) :
def rat_reciprocal  :
Equations
theorem reciprocal_eq (a b : myrat) :
def negate_rat  :
Equations
theorem negate_def (a : myrat) :
theorem negate_undef (a : myrat) :
theorem negate_eq_rat (a b : myrat) :
theorem double_negate (a : myrat) :
theorem mul_negate (a b : myrat) :
theorem mul_negate_rw (a b : myrat) :
theorem iszero_mul_rat (a b : myrat) :
inductive rat_plus_sqrt (a : myrat) :
Type
def defined_rps (k : myrat) :
rat_plus_sqrt k → Prop
Equations
def rps_equal (k : myrat) :
rat_plus_sqrt krat_plus_sqrt k → Prop
Equations
def iszero_rps (k : myrat) :
rat_plus_sqrt k → Prop
Equations
theorem add_zero_rps_alt (k : myrat) (a : rat_plus_sqrt k) :
add_rps k a (zero_rps k) = a
theorem add_comm_rps (k : myrat) (a b : rat_plus_sqrt k) :
add_rps k a b = add_rps k b a
theorem add_assoc_rps (k : myrat) (a b c : rat_plus_sqrt k) :
add_rps k (add_rps k a b) c = add_rps k a (add_rps k b c)
theorem add_zero_rps (k : myrat) (a b : rat_plus_sqrt k) :
iszero_rps k arps_equal k (add_rps k a b) b
theorem add_def_rps (k : myrat) (a b : rat_plus_sqrt k) :
defined_rps k adefined_rps k bdefined_rps k (add_rps k a b)
theorem negate_and (a b c : Prop) :
¬(a b c)¬a ¬b ¬c
theorem add_undef_rps (k : myrat) (a b : rat_plus_sqrt k) :
theorem negate_add_inv_rps (k : myrat) (a : rat_plus_sqrt k) :
theorem mul_comm_rps (k : myrat) (a b : rat_plus_sqrt k) :
mul_rps k a b = mul_rps k b a
theorem mul_assoc_rps (k : myrat) (a b c : rat_plus_sqrt k) :
rps_equal k (mul_rps k (mul_rps k a b) c) (mul_rps k a (mul_rps k b c))
theorem mul_distrib_rps (k : myrat) (a b c : rat_plus_sqrt k) :
rps_equal k (mul_rps k (add_rps k a b) c) (add_rps k (mul_rps k a c) (mul_rps k b c))
def discriminant  :
myratmyratmyratmyrat
Equations
def quadratic_subst (k : myrat) :
Equations
theorem mul_two_rat (a : myrat) :