tasksource/leandojo huggingface dataset:
Theorem: CategoryTheory.GrothendieckTopology.arrow_max
File: Mathlib/CategoryTheory/Sites/Grothendieck.lean

tactic: rw [Covers, (Sieve.pullback_eq_top_iff_mem f).1 hf]
state_before: C : Type u
inst✝ : Category C
X Y : C
S✝ R : Sieve X
J : GrothendieckTopology C
f : Y ⟶ X
S : Sieve X
hf : S.arrows f
⊢ Covers J S f

tactic: apply J.top_mem
state_before: C : Type u
inst✝ : Category C
X Y : C
S✝ R : Sieve X
J : GrothendieckTopology C
f : Y ⟶ X
S : Sieve X
hf : S.arrows f
⊢ ⊤ ∈ sieves J Y
Theorem: Lagrange.interpolate_one
File: Mathlib/LinearAlgebra/Lagrange.lean

tactic: simp_rw [interpolate_apply, Pi.one_apply, map_one, one_mul]
state_before: F : Type u_2
inst✝¹ : Field F
ι : Type u_1
inst✝ : DecidableEq ι
s t : Finset ι
i j : ι
v r r' : ι → F
hvs : Set.InjOn v ↑s
hs : Finset.Nonempty s
⊢ ↑(interpolate s v) 1 = 1

tactic: exact sum_basis hvs hs
state_before: F : Type u_2
inst✝¹ : Field F
ι : Type u_1
inst✝ : DecidableEq ι
s t : Finset ι
i j : ι
v r r' : ι → F
hvs : Set.InjOn v ↑s
hs : Finset.Nonempty s
⊢ ∑ x in s, Lagrange.basis s v x = 1
Theorem: minpoly.aeval
File: Mathlib/FieldTheory/Minpoly/Basic.lean

tactic: delta minpoly
state_before: A : Type u_2
B : Type u_1
B' : Type ?u.17400
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
⊢ ↑(Polynomial.aeval x) (minpoly A x) = 0

tactic: split_ifs with hx
state_before: A : Type u_2
B : Type u_1
B' : Type ?u.17400
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
⊢ ↑(Polynomial.aeval x)
      (if hx : IsIntegral A x then
        WellFounded.min (_ : WellFounded fun p q => degree p < degree q)
          (fun x_1 => Monic x_1 ∧ eval₂ (algebraMap A B) x x_1 = 0) hx
      else 0) =
    0

tactic: rw [dif_pos hx]
state_before: case inl
A : Type u_2
B : Type u_1
B' : Type ?u.17400
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : IsIntegral A x
⊢ ↑(Polynomial.aeval x)
      (if hx : IsIntegral A x then
        WellFounded.min (_ : WellFounded fun p q => degree p < degree q)
          (fun x_1 => Monic x_1 ∧ eval₂ (algebraMap A B) x x_1 = 0) hx
      else 0) =
    0

tactic: exact (degree_lt_wf.min_mem _ hx).2
state_before: case inl
A : Type u_2
B : Type u_1
B' : Type ?u.17400
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : IsIntegral A x
⊢ ↑(Polynomial.aeval x)
      (WellFounded.min (_ : WellFounded fun p q => degree p < degree q)
        (fun x_1 => Monic x_1 ∧ eval₂ (algebraMap A B) x x_1 = 0) hx) =
    0

tactic: rw [dif_neg hx]
state_before: case inr
A : Type u_2
B : Type u_1
B' : Type ?u.17400
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : ¬IsIntegral A x
⊢ ↑(Polynomial.aeval x)
      (if hx : IsIntegral A x then
        WellFounded.min (_ : WellFounded fun p q => degree p < degree q)
          (fun x_1 => Monic x_1 ∧ eval₂ (algebraMap A B) x x_1 = 0) hx
      else 0) =
    0

tactic: exact aeval_zero _
state_before: case inr
A : Type u_2
B : Type u_1
B' : Type ?u.17400
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : ¬IsIntegral A x
⊢ ↑(Polynomial.aeval x) 0 = 0
Theorem: Matrix.map_id
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext
state_before: l : Type ?u.6402
m : Type u_1
n : Type u_2
o : Type ?u.6411
m' : o → Type ?u.6416
n' : o → Type ?u.6421
R : Type ?u.6424
S : Type ?u.6427
α : Type v
β : Type w
γ : Type ?u.6434
M : Matrix m n α
⊢ map M id = M

tactic: rfl
state_before: case a.h
l : Type ?u.6402
m : Type u_1
n : Type u_2
o : Type ?u.6411
m' : o → Type ?u.6416
n' : o → Type ?u.6421
R : Type ?u.6424
S : Type ?u.6427
α : Type v
β : Type w
γ : Type ?u.6434
M : Matrix m n α
i✝ : m
x✝ : n
⊢ map M id i✝ x✝ = M i✝ x✝
Theorem: abs_le_of_sq_le_sq
File: Mathlib/Algebra/GroupPower/Order.lean

tactic: rwa [← abs_of_nonneg hy, ← sq_le_sq]
state_before: β : Type ?u.265331
A : Type ?u.265334
G : Type ?u.265337
M : Type ?u.265340
R : Type u_1
inst✝ : LinearOrderedRing R
x y : R
h : x ^ 2 ≤ y ^ 2
hy : 0 ≤ y
⊢ abs x ≤ y
Theorem: AlgebraicIndependent.mvPolynomialOptionEquivPolynomialAdjoin_X_some
File: Mathlib/RingTheory/AlgebraicIndependent.lean

tactic: rw [AlgebraicIndependent.mvPolynomialOptionEquivPolynomialAdjoin_apply, aeval_X, Option.elim,
  Polynomial.map_C, RingHom.coe_coe]
state_before: ι : Type u_1
ι' : Type ?u.1169857
R : Type u_2
K : Type ?u.1169863
A : Type u_3
A' : Type ?u.1169869
A'' : Type ?u.1169872
V : Type u
V' : Type ?u.1169877
x : ι → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
hx : AlgebraicIndependent R x
i : ι
⊢ ↑(mvPolynomialOptionEquivPolynomialAdjoin hx) (X (some i)) = ↑Polynomial.C (↑(aevalEquiv hx) (X i))
Theorem: Matrix.neg_cons
File: Mathlib/Data/Fin/VecNotation.lean

tactic: ext i
state_before: α : Type u
m n o : ℕ
m' : Type ?u.86190
n' : Type ?u.86193
o' : Type ?u.86196
inst✝ : Neg α
x : α
v : Fin n → α
⊢ -vecCons x v = vecCons (-x) (-v)

tactic: refine' Fin.cases _ _ i <;> simp
state_before: case h
α : Type u
m n o : ℕ
m' : Type ?u.86190
n' : Type ?u.86193
o' : Type ?u.86196
inst✝ : Neg α
x : α
v : Fin n → α
i : Fin (Nat.succ n)
⊢ (-vecCons x v) i = vecCons (-x) (-v) i
Theorem: Ordinal.CNF_foldr
File: Mathlib/SetTheory/Ordinal/CantorNormalForm.lean

tactic: rw [CNF_zero]
state_before: b o : Ordinal
⊢ foldr (fun p r => b ^ p.fst * p.snd + r) 0 (CNF b 0) = 0

tactic: rfl
state_before: b o : Ordinal
⊢ foldr (fun p r => b ^ p.fst * p.snd + r) 0 [] = 0

tactic: rw [CNF_ne_zero ho, foldr_cons, IH, div_add_mod]
state_before: b o✝ o : Ordinal
ho : o ≠ 0
IH : foldr (fun p r => b ^ p.fst * p.snd + r) 0 (CNF b (o % b ^ log b o)) = o % b ^ log b o
⊢ foldr (fun p r => b ^ p.fst * p.snd + r) 0 (CNF b o) = o
Theorem: CategoryTheory.StructuredArrow.isCoseparating_proj_preimage
File: Mathlib/CategoryTheory/Generator.lean

tactic: refine' fun X Y f g hfg => ext _ _ (h𝒢 _ _ fun G hG h => _)
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
S : D
T : C ⥤ D
𝒢 : Set C
h𝒢 : IsCoseparating 𝒢
⊢ IsCoseparating ((proj S T).toPrefunctor.obj ⁻¹' 𝒢)

tactic: exact congr_arg CommaMorphism.right (hfg (mk (Y.hom ≫ T.map h)) hG (homMk h rfl))
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
S : D
T : C ⥤ D
𝒢 : Set C
h𝒢 : IsCoseparating 𝒢
X Y : StructuredArrow S T
f g : X ⟶ Y
hfg : ∀ (G : StructuredArrow S T), G ∈ (proj S T).toPrefunctor.obj ⁻¹' 𝒢 → ∀ (h : Y ⟶ G), f ≫ h = g ≫ h
G : C
hG : G ∈ 𝒢
h : Y.right ⟶ G
⊢ f.right ≫ h = g.right ≫ h
Theorem: Array.set_set
File: Std/Data/Array/Lemmas.lean

tactic: simp [i.2]
state_before: α : Type ?u.19284
a : Array α
i : Fin (size a)
v v' : α
⊢ i.val < size (set a i v)

tactic: simp [set, List.set_set]
state_before: α : Type u_1
a : Array α
i : Fin (size a)
v v' : α
⊢ set (set a i v) { val := i.val, isLt := (_ : i.val < size (set a i v)) } v' = set a i v'
Theorem: MeasureTheory.Integrable.edist_toL1_toL1
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: simp [Integrable.toL1, snorm, snorm']
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.1322600
δ : Type ?u.1322603
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : α → β
hf : Integrable f
hg : Integrable g
⊢ edist (toL1 f hf) (toL1 g hg) = ∫⁻ (a : α), edist (f a) (g a) ∂μ

tactic: simp [edist_eq_coe_nnnorm_sub]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.1322600
δ : Type ?u.1322603
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : α → β
hf : Integrable f
hg : Integrable g
⊢ (∫⁻ (a : α), ↑‖f a - g a‖₊ ∂μ) = ∫⁻ (a : α), edist (f a) (g a) ∂μ
Theorem: LucasLehmer.mersenne_int_pos
File: Mathlib/NumberTheory/LucasLehmer.lean

tactic: exact_mod_cast Nat.one_lt_two_pow p hp
state_before: p : ℕ
hp : 0 < p
⊢ 1 < 2 ^ p
Theorem: Set.inter_compl_nonempty_iff
File: Mathlib/Data/Set/Basic.lean

tactic: simp [mem_compl]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t✝ t₁ t₂ u s t : Set α
x : α
⊢ x ∈ s ∧ ¬x ∈ t ↔ x ∈ s ∩ tᶜ
Theorem: Ring.ne_bot_of_isMaximal_of_not_isField
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: rintro h
state_before: α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
M : Ideal R
max : Ideal.IsMaximal M
not_field : ¬IsField R
⊢ M ≠ ⊥

tactic: rw [h] at max
state_before: α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
M : Ideal R
max : Ideal.IsMaximal M
not_field : ¬IsField R
h : M = ⊥
⊢ False

tactic: rcases max with ⟨⟨_h1, h2⟩⟩
state_before: α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
M : Ideal R
max : Ideal.IsMaximal ⊥
not_field : ¬IsField R
h : M = ⊥
⊢ False

tactic: obtain ⟨I, hIbot, hItop⟩ := not_isField_iff_exists_ideal_bot_lt_and_lt_top.mp not_field
state_before: case mk.intro
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
M : Ideal R
not_field : ¬IsField R
h : M = ⊥
_h1 : ⊥ ≠ ⊤
h2 : ∀ (b : Ideal R), ⊥ < b → b = ⊤
⊢ False

tactic: exact ne_of_lt hItop (h2 I hIbot)
state_before: case mk.intro.intro.intro
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
M : Ideal R
not_field : ¬IsField R
h : M = ⊥
_h1 : ⊥ ≠ ⊤
h2 : ∀ (b : Ideal R), ⊥ < b → b = ⊤
I : Ideal R
hIbot : ⊥ < I
hItop : I < ⊤
⊢ False
Theorem: Int.cast_neg_natCast
File: Mathlib/Data/Int/Cast/Field.lean

tactic: simp
state_before: α : Type ?u.5
R : Type u_1
inst✝ : DivisionRing R
n : ℕ
⊢ ↑(-↑n) = -↑n
Theorem: MonoidAlgebra.mul_single_apply_aux
File: Mathlib/Algebra/MonoidAlgebra/Basic.lean

tactic: classical exact
    have A :
      ∀ a₁ b₁,
        ((single x r).sum fun a₂ b₂ => ite (a₁ * a₂ = z) (b₁ * b₂) 0) =
          ite (a₁ * x = z) (b₁ * r) 0 :=
      fun a₁ b₁ => sum_single_index <| by simp
    calc
      (HMul.hMul (β := MonoidAlgebra k G) f (single x r)) z =
          sum f fun a b => if a = y then b * r else 0 := by simp only [mul_apply, A, H]
      _ = if y ∈ f.support then f y * r else 0 := (f.support.sum_ite_eq' _ _)
      _ = f y * r := by split_ifs with h <;> simp at h <;> simp [h]
state_before: k : Type u₁
G : Type u₂
R : Type ?u.494305
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), a * x = z ↔ a = y
⊢ ↑(f * single x r) z = ↑f y * r

tactic: exact
have A :
∀ a₁ b₁,
((single x r).sum fun a₂ b₂ => ite (a₁ * a₂ = z) (b₁ * b₂) 0) =
ite (a₁ * x = z) (b₁ * r) 0 :=
fun a₁ b₁ => sum_single_index <| by simp
calc
(HMul.hMul (β := MonoidAlgebra k G) f (single x r)) z =
sum f fun a b => if a = y then b * r else 0 := by simp only [mul_apply, A, H]
_ = if y ∈ f.support then f y * r else 0 := (f.support.sum_ite_eq' _ _)
_ = f y * r := by split_ifs with h <;> simp at h <;> simp [h]
state_before: k : Type u₁
G : Type u₂
R : Type ?u.494305
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), a * x = z ↔ a = y
⊢ ↑(f * single x r) z = ↑f y * r

tactic: simp
state_before: k : Type u₁
G : Type u₂
R : Type ?u.494305
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), a * x = z ↔ a = y
a₁ : G
b₁ : k
⊢ (if a₁ * x = z then b₁ * 0 else 0) = 0

tactic: simp only [mul_apply, A, H]
state_before: k : Type u₁
G : Type u₂
R : Type ?u.494305
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), a * x = z ↔ a = y
A :
  ∀ (a₁ : G) (b₁ : k),
    (sum (single x r) fun a₂ b₂ => if a₁ * a₂ = z then b₁ * b₂ else 0) = if a₁ * x = z then b₁ * r else 0
⊢ ↑(f * single x r) z = sum f fun a b => if a = y then b * r else 0

tactic: split_ifs with h <;> simp at h <;> simp [h]
state_before: k : Type u₁
G : Type u₂
R : Type ?u.494305
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), a * x = z ↔ a = y
A :
  ∀ (a₁ : G) (b₁ : k),
    (sum (single x r) fun a₂ b₂ => if a₁ * a₂ = z then b₁ * b₂ else 0) = if a₁ * x = z then b₁ * r else 0
⊢ (if y ∈ f.support then ↑f y * r else 0) = ↑f y * r
Theorem: tendsto_pow_atTop_nhds_0_of_norm_lt_1
File: Mathlib/Analysis/SpecificLimits/Normed.lean

tactic: apply squeeze_zero_norm' (eventually_norm_pow_le x)
state_before: α : Type ?u.130810
β : Type ?u.130813
ι : Type ?u.130816
R : Type u_1
inst✝ : NormedRing R
x : R
h : ‖x‖ < 1
⊢ Tendsto (fun n => x ^ n) atTop (𝓝 0)

tactic: exact tendsto_pow_atTop_nhds_0_of_lt_1 (norm_nonneg _) h
state_before: α : Type ?u.130810
β : Type ?u.130813
ι : Type ?u.130816
R : Type u_1
inst✝ : NormedRing R
x : R
h : ‖x‖ < 1
⊢ Tendsto (fun n => ‖x‖ ^ n) atTop (𝓝 0)
Theorem: CategoryTheory.Equivalence.funInvIdAssoc_inv_app
File: Mathlib/CategoryTheory/Equivalence.lean

tactic: dsimp [funInvIdAssoc]
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
E : Type u₃
inst✝ : Category E
e : C ≌ D
F : C ⥤ E
X : C
⊢ (funInvIdAssoc e F).inv.app X = F.map ((unit e).app X)

tactic: aesop_cat
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
E : Type u₃
inst✝ : Category E
e : C ≌ D
F : C ⥤ E
X : C
⊢ (𝟙 (F.obj X) ≫ F.map (e.unitIso.hom.app X)) ≫ 𝟙 (F.obj (e.inverse.obj (e.functor.obj X))) = F.map ((unit e).app X)
Theorem: mul_basis_toMatrix
File: Mathlib/LinearAlgebra/Matrix/Basis.lean

tactic: have := linearMap_toMatrix_mul_basis_toMatrix b₂ b₁ b₃ (Matrix.toLin b₁ b₃ A)
state_before: ι : Type u_1
ι' : Type u_2
κ : Type u_5
κ' : Type ?u.502195
R : Type u_3
M : Type u_4
inst✝¹³ : CommSemiring R
inst✝¹² : AddCommMonoid M
inst✝¹¹ : Module R M
R₂ : Type ?u.502388
M₂ : Type ?u.502391
inst✝¹⁰ : CommRing R₂
inst✝⁹ : AddCommGroup M₂
inst✝⁸ : Module R₂ M₂
e : Basis ι R M
v : ι' → M
i : ι
j : ι'
N : Type u_6
inst✝⁷ : AddCommMonoid N
inst✝⁶ : Module R N
b : Basis ι R M
b' : Basis ι' R M
c : Basis κ R N
c' : Basis κ' R N
f : M →ₗ[R] N
inst✝⁵ : Fintype ι'
inst✝⁴ : Fintype κ
inst✝³ : Fintype κ'
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq ι'
b₁ : Basis ι R M
b₂ : Basis ι' R M
b₃ : Basis κ R N
A : Matrix κ ι R
⊢ A ⬝ Basis.toMatrix b₁ ↑b₂ = ↑(toMatrix b₂ b₃) (↑(toLin b₁ b₃) A)

tactic: rwa [LinearMap.toMatrix_toLin] at this
state_before: ι : Type u_1
ι' : Type u_2
κ : Type u_5
κ' : Type ?u.502195
R : Type u_3
M : Type u_4
inst✝¹³ : CommSemiring R
inst✝¹² : AddCommMonoid M
inst✝¹¹ : Module R M
R₂ : Type ?u.502388
M₂ : Type ?u.502391
inst✝¹⁰ : CommRing R₂
inst✝⁹ : AddCommGroup M₂
inst✝⁸ : Module R₂ M₂
e : Basis ι R M
v : ι' → M
i : ι
j : ι'
N : Type u_6
inst✝⁷ : AddCommMonoid N
inst✝⁶ : Module R N
b : Basis ι R M
b' : Basis ι' R M
c : Basis κ R N
c' : Basis κ' R N
f : M →ₗ[R] N
inst✝⁵ : Fintype ι'
inst✝⁴ : Fintype κ
inst✝³ : Fintype κ'
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq ι'
b₁ : Basis ι R M
b₂ : Basis ι' R M
b₃ : Basis κ R N
A : Matrix κ ι R
this : ↑(toMatrix b₁ b₃) (↑(toLin b₁ b₃) A) ⬝ Basis.toMatrix b₁ ↑b₂ = ↑(toMatrix b₂ b₃) (↑(toLin b₁ b₃) A)
⊢ A ⬝ Basis.toMatrix b₁ ↑b₂ = ↑(toMatrix b₂ b₃) (↑(toLin b₁ b₃) A)
Theorem: Finset.prod_inter_mul_prod_diff
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: convert (s.prod_piecewise t f f).symm
state_before: ι : Type ?u.772557
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
s t : Finset α
f : α → β
⊢ (∏ x in s ∩ t, f x) * ∏ x in s \ t, f x = ∏ x in s, f x

tactic: simp [Finset.piecewise]
state_before: case h.e'_3.a.h.e
ι : Type ?u.772557
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
s t : Finset α
f : α → β
x✝ : α
a✝ : x✝ ∈ s
⊢ f = piecewise t f f
Theorem: Nat.Primrec.casesOn'
File: Mathlib/Computability/Primrec.lean

tactic: simp
state_before: f g : ℕ → ℕ
hf : Nat.Primrec f
hg : Nat.Primrec g
n : ℕ
⊢ unpaired
      (fun z n =>
        Nat.rec (f z)
          (fun y IH =>
            g
              (Nat.pair (unpair (Nat.pair z (Nat.pair y IH))).fst
                (unpair (unpair (Nat.pair z (Nat.pair y IH))).snd).fst))
          n)
      n =
    unpaired (fun z n => Nat.casesOn n (f z) fun y => g (Nat.pair z y)) n
Theorem: Real.rpow_left_injOn
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rintro y hy z hz (hyz : y ^ x = z ^ x)
state_before: x✝ y z x : ℝ
hx : x ≠ 0
⊢ InjOn (fun y => y ^ x) {y | 0 ≤ y}

tactic: rw [← rpow_one y, ← rpow_one z, ← _root_.mul_inv_cancel hx, rpow_mul hy, rpow_mul hz, hyz]
state_before: x✝ y✝ z✝ x : ℝ
hx : x ≠ 0
y : ℝ
hy : y ∈ {y | 0 ≤ y}
z : ℝ
hz : z ∈ {y | 0 ≤ y}
hyz : y ^ x = z ^ x
⊢ y = z
Theorem: Finset.product_eq_biUnion
File: Mathlib/Data/Finset/Prod.lean

tactic: simp only [mem_product, mem_biUnion, mem_image, exists_prop, Prod.mk.inj_iff, and_left_comm,
  exists_and_left, exists_eq_right, exists_eq_left]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.18842
s✝ s' : Finset α
t✝ t' : Finset β
a : α
b : β
inst✝ : DecidableEq (α × β)
s : Finset α
t : Finset β
x✝ : α × β
x : α
y : β
⊢ (x, y) ∈ s ×ˢ t ↔ (x, y) ∈ Finset.biUnion s fun a => image (fun b => (a, b)) t
Theorem: ENNReal.le_of_forall_pos_le_add
File: Mathlib/Data/Real/ENNReal.lean

tactic: contrapose! h
state_before: α : Type ?u.129734
β : Type ?u.129737
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : ∀ (ε : ℝ≥0), 0 < ε → b < ⊤ → a ≤ b + ↑ε
⊢ a ≤ b

tactic: rcases lt_iff_exists_add_pos_lt.1 h with ⟨r, hr0, hr⟩
state_before: α : Type ?u.129734
β : Type ?u.129737
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : b < a
⊢ ∃ ε, 0 < ε ∧ b < ⊤ ∧ b + ↑ε < a

tactic: exact ⟨r, hr0, h.trans_le le_top, hr⟩
state_before: case intro.intro
α : Type ?u.129734
β : Type ?u.129737
a b c d : ℝ≥0∞
r✝ p q : ℝ≥0
h : b < a
r : ℝ≥0
hr0 : 0 < r
hr : b + ↑r < a
⊢ ∃ ε, 0 < ε ∧ b < ⊤ ∧ b + ↑ε < a
Theorem: Polynomial.modByMonic_eq_mod
File: Mathlib/Data/Polynomial/FieldDivision.lean

tactic: simp only [Monic.def.1 hq, inv_one, mul_one, C_1]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p✝ q p : R[X]
hq : Monic q
⊢ p %ₘ q = p %ₘ (q * ↑C (leadingCoeff q)⁻¹)
Theorem: Pmf.toOuterMeasure_bind_apply
File: Mathlib/Probability/ProbabilityMassFunction/Monad.lean

tactic: simp [toOuterMeasure_apply, Set.indicator_apply]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.66368
p : Pmf α
f : α → Pmf β
g : β → Pmf γ
s : Set β
⊢ ↑(toOuterMeasure (bind p f)) s = ∑' (b : β), if b ∈ s then ∑' (a : α), ↑p a * ↑(f a) b else 0

tactic: split_ifs <;> simp
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.66368
p : Pmf α
f : α → Pmf β
g : β → Pmf γ
s : Set β
b : β
⊢ (if b ∈ s then ∑' (a : α), ↑p a * ↑(f a) b else 0) = ∑' (a : α), ↑p a * if b ∈ s then ↑(f a) b else 0

tactic: split_ifs <;> rfl
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.66368
p : Pmf α
f : α → Pmf β
g : β → Pmf γ
s : Set β
a : α
b : β
⊢ (if b ∈ s then ↑(f a) b else 0) = if b ∈ s then ↑(f a) b else 0

tactic: simp only [toOuterMeasure_apply, Set.indicator_apply]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.66368
p : Pmf α
f : α → Pmf β
g : β → Pmf γ
s : Set β
a : α
⊢ (↑p a * ∑' (b : β), if b ∈ s then ↑(f a) b else 0) = ↑p a * ↑(toOuterMeasure (f a)) s
Theorem: Real.Angle.expMapCircle_neg
File: Mathlib/Analysis/SpecialFunctions/Complex/Circle.lean

tactic: induction θ using Real.Angle.induction_on
state_before: θ : Angle
⊢ expMapCircle (-θ) = (expMapCircle θ)⁻¹

tactic: simp_rw [← Real.Angle.coe_neg, Real.Angle.expMapCircle_coe, _root_.expMapCircle_neg]
state_before: case h
x✝ : ℝ
⊢ expMapCircle (-↑x✝) = (expMapCircle ↑x✝)⁻¹
Theorem: Filter.ZeroAtFilter.smul
File: Mathlib/Order/Filter/ZeroAndBoundedAtFilter.lean

tactic: simpa using hf.const_smul c
state_before: α : Type u_3
β : Type u_2
𝕜 : Type u_1
inst✝⁵ : TopologicalSpace 𝕜
inst✝⁴ : TopologicalSpace β
inst✝³ : Zero 𝕜
inst✝² : Zero β
inst✝¹ : SMulWithZero 𝕜 β
inst✝ : ContinuousSMul 𝕜 β
l : Filter α
f : α → β
c : 𝕜
hf : ZeroAtFilter l f
⊢ ZeroAtFilter l (c • f)
Theorem: mem_span_set
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: conv_lhs => rw [← Set.image_id s]
state_before: R : Type u_2
M : Type u_1
N : Type ?u.764012
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
m : M
s : Set M
⊢ m ∈ span R s ↔ ∃ c, ↑c.support ⊆ s ∧ (Finsupp.sum c fun mi r => r • mi) = m

tactic: exact Finsupp.mem_span_image_iff_total R (v := _root_.id (α := M))
state_before: R : Type u_2
M : Type u_1
N : Type ?u.764012
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
m : M
s : Set M
⊢ m ∈ span R (_root_.id '' s) ↔ ∃ c, ↑c.support ⊆ s ∧ (Finsupp.sum c fun mi r => r • mi) = m
Theorem: MeasureTheory.Measure.QuasiMeasurePreserving.smul_ae_eq_of_ae_eq
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: simpa only [← preimage_smul_inv] using h_qmp.ae_eq h_ae_eq
state_before: α✝ : Type ?u.524934
β : Type ?u.524937
γ : Type ?u.524940
δ : Type ?u.524943
ι : Type ?u.524946
R : Type ?u.524949
R' : Type ?u.524952
m0 : MeasurableSpace α✝
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace γ
μ✝ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α✝
s✝ s' t✝ : Set α✝
μa μa' : Measure α✝
μb μb' : Measure β
μc : Measure γ
f : α✝ → β
G : Type u_1
α : Type u_2
inst✝² : Group G
inst✝¹ : MulAction G α
inst✝ : MeasurableSpace α
s t : Set α
μ : Measure α
g : G
h_qmp : QuasiMeasurePreserving ((fun x x_1 => x • x_1) g⁻¹)
h_ae_eq : s =ᵐ[μ] t
⊢ g • s =ᵐ[μ] g • t
Theorem: HomogeneousLocalization.ext_iff_val
File: Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean

tactic: induction f using Quotient.inductionOn'
state_before: ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
f g : HomogeneousLocalization 𝒜 x
h : val f = val g
⊢ f = g

tactic: induction g using Quotient.inductionOn'
state_before: case h
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
g : HomogeneousLocalization 𝒜 x
a✝ : NumDenSameDeg 𝒜 x
h : val (Quotient.mk'' a✝) = val g
⊢ Quotient.mk'' a✝ = g

tactic: rw [Quotient.eq'']
state_before: case h.h
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
a✝¹ a✝ : NumDenSameDeg 𝒜 x
h : val (Quotient.mk'' a✝¹) = val (Quotient.mk'' a✝)
⊢ Quotient.mk'' a✝¹ = Quotient.mk'' a✝

tactic: simpa only [Quotient.liftOn'_mk] using h
state_before: case h.h
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
a✝¹ a✝ : NumDenSameDeg 𝒜 x
h : val (Quotient.mk'' a✝¹) = val (Quotient.mk'' a✝)
⊢ Setoid.r a✝¹ a✝
Theorem: Multiset.bind_congr
File: Mathlib/Data/Multiset/Bind.lean

tactic: simp (config := { contextual := true }) [bind]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.25404
δ : Type ?u.25407
a : α
s t : Multiset α
f✝ g✝ f g : α → Multiset β
m : Multiset α
⊢ (∀ (a : α), a ∈ m → f a = g a) → bind m f = bind m g
Theorem: MeasureTheory.snorm_one_smul_measure
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: rw [@snorm_smul_measure_of_ne_top _ _ _ μ _ 1 (@ENNReal.coe_ne_top 1) f c]
state_before: α : Type u_1
E : Type ?u.2301795
F : Type u_2
G : Type ?u.2301801
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
c : ℝ≥0∞
⊢ snorm f 1 (c • μ) = c * snorm f 1 μ

tactic: simp
state_before: α : Type u_1
E : Type ?u.2301795
F : Type u_2
G : Type ?u.2301801
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
c : ℝ≥0∞
⊢ c ^ ENNReal.toReal (1 / 1) • snorm f 1 μ = c * snorm f 1 μ