theorem
proved
add_assoc
show as:
view math explainer →
open explainer
Read the cached plain-language explainer.
open lean source
IndisputableMonolith.Foundation.ArithmeticFromLogic on GitHub at line 154.
browse module
All declarations in this module, on Recognition.
explainer page
Derivations using this theorem
depends on
used by
-
plot_composition_cancels_iff -
H_dAlembert -
sub_eq_add -
PhiInt -
canonicalPhiRingObj -
PhiRingObj -
duhamelRemainderOfGalerkin_integratingFactor -
unitSphereSurface_D3 -
Jcost_one_plus_eps_quadratic -
Jcost_small_strain_bound -
dAlembert_product -
Jcost_one_plus_eps_quadratic -
Jcost_small_strain_bound -
Jcost_log_second_deriv_normalized -
virtue_composition_associative -
neutralityScore_shift1_of_periodic8 -
le_trans -
mul_add -
cosh_quadratic_bound -
conservation_from_balance -
eventCompose_assoc -
preferenceCompose_assoc -
reproduce_assoc -
kernel_response_limit -
response_function_is_real_part -
n_of_r_mono_A_of_nonneg_p -
cone_bound -
cone_bound_saturates -
reach_rad_le -
reach_time_eq -
ledger_fraction_kn_forced_under_passive_bound -
ledger_fraction_numerator_offset_forced -
anchor_ratio -
measurement_bridge_C_eq_2A -
pathFromRotation -
kernel_integral_match -
coerciveL2Bound_of_tailFluxVanish -
integral_rm2uOp_mul_energy_identity -
hasDerivAt_rsq_mul -
zeroSkewAtInfinity_of_integrable
formal source
151 show succ n + succ m = succ (n + succ m)
152 rw [add_succ, add_succ, ih]
153
154theorem add_assoc (a b c : LogicNat) : (a + b) + c = a + (b + c) := by
155 induction c with
156 | identity => rfl
157 | step c ih =>
158 show (a + b) + succ c = a + (b + succ c)
159 rw [add_succ, add_succ, add_succ, ih]
160
161theorem add_comm (a b : LogicNat) : a + b = b + a := by
162 induction b with
163 | identity =>
164 show a + zero = zero + a
165 rw [add_zero, zero_add]
166 | step b ih =>
167 show a + succ b = succ b + a
168 rw [add_succ, succ_add, ih]
169
170/-- Multiplication by recursion on the second argument. -/
171def mul : LogicNat → LogicNat → LogicNat
172 | _, .identity => zero
173 | n, .step m => mul n m + n
174
175instance : Mul LogicNat := ⟨mul⟩
176
177@[simp] theorem mul_def (n m : LogicNat) : n * m = mul n m := rfl
178
179@[simp] theorem mul_zero (n : LogicNat) : n * zero = zero := rfl
180
181@[simp] theorem mul_succ (n m : LogicNat) : n * succ m = n * m + n := rfl
182
183theorem zero_mul (n : LogicNat) : zero * n = zero := by
184 induction n with