def
definition
mul
show as:
view math explainer →
open explainer
Read the cached plain-language explainer.
open lean source
IndisputableMonolith.Foundation.ArithmeticFromLogic on GitHub at line 171.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
-
shiftedComposeH_val -
shiftedCompose_val -
J_at_phi -
PhiInt -
canonicalPhiRingObj -
PhiRingHom -
PhiRingObj -
divConstraint_continuous -
duhamelKernelDominatedConvergenceAt_of_forcing -
DimensionedQuantity -
dAlembert_contDiff_top -
dAlembert_contDiff_top -
dAlembert_first_deriv_of_contDiff -
dAlembert_second_deriv_at_zero_of_contDiff -
dAlembert_continuous_of_log_curvature -
deriv_neg_self_zero -
deriv_pos_self_zero -
tendsto_H_one_of_log_curvature -
Jcost_continuous_pos -
hasDerivAt_costAlphaLog_first -
mul_def -
toComplex_mul -
hasDerivAt_costAlphaLog -
log_bilinear_affine_lift_classification -
mul -
add_mul' -
mul -
response_limit_high_freq -
solution_exists -
G_ratio_continuous_snd -
ode_neg_energy_constant -
coerciveL2Bound_of_tailFluxVanish -
bet1_boundaryTerm_integrable_of_L2_mul_r -
rm2Closed_of_coerciveL2Bound -
ancientDecay_implies_Aprime2r2_integrable -
operatorPairing_of_decayFull -
hasDerivAt_rsq_mul -
zeroSkewAtInfinity_of_integrable -
zpow_phase_charge -
genuineZetaDerivedPhaseData
formal source
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
185 | identity => rfl
186 | step n ih =>
187 show zero * succ n = zero
188 rw [mul_succ, ih, zero_add]
189
190theorem mul_one (n : LogicNat) : n * succ zero = n := by
191 show n * succ zero = n
192 rw [mul_succ, mul_zero, zero_add]
193
194theorem one_mul (n : LogicNat) : succ zero * n = n := by
195 induction n with
196 | identity => rfl
197 | step n ih =>
198 show succ zero * succ n = succ n
199 rw [mul_succ, ih]
200 show n + succ zero = succ n
201 rw [add_succ, add_zero]