1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Sym.fill_filterNe
File: Mathlib/Data/Sym/Basic.lean

tactic: rw [coe_fill, filterNe, ← val_eq_coe, Subtype.coe_mk, Fin.val_mk]
state_before: α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
a : α
m : Sym α n
⊢ ↑(fill a (filterNe a m).fst (filterNe a m).snd) = ↑m
state_after: α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
a : α
m : Sym α n
⊢ filter (fun x => a ≠ x) ↑m + ↑(replicate (count a ↑m) a) = ↑m

tactic: ext b
state_before: α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
a : α
m : Sym α n
⊢ filter (fun x => a ≠ x) ↑m + ↑(replicate (count a ↑m) a) = ↑m
state_after: case a
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
⊢ count b (filter (fun x => a ≠ x) ↑m + ↑(replicate (count a ↑m) a)) = count b ↑m

tactic: dsimp
state_before: case a
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
⊢ count b (filter (fun x => a ≠ x) ↑m + ↑(replicate (count a ↑m) a)) = count b ↑m
state_after: case a
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
⊢ count b (filter (fun x => ¬a = x) ↑m + ↑(replicate (count a ↑m) a)) = count b ↑m

tactic: rw [count_add, count_filter, Sym.coe_replicate, count_replicate]
state_before: case a
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
⊢ count b (filter (fun x => ¬a = x) ↑m + ↑(replicate (count a ↑m) a)) = count b ↑m
state_after: case a
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
⊢ ((if ¬a = b then count b ↑m else 0) + if b = a then count a ↑m else 0) = count b ↑m

tactic: obtain rfl | h := eq_or_ne a b
state_before: case a
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
⊢ ((if ¬a = b then count b ↑m else 0) + if b = a then count a ↑m else 0) = count b ↑m
state_after: case a.inl
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
a : α
m : Sym α n
⊢ ((if ¬a = a then count a ↑m else 0) + if a = a then count a ↑m else 0) = count a ↑m

case a.inr
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
h : a ≠ b
⊢ ((if ¬a = b then count b ↑m else 0) + if b = a then count a ↑m else 0) = count b ↑m

tactic: rw [if_pos rfl, if_neg (not_not.2 rfl), zero_add]
state_before: case a.inl
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
a : α
m : Sym α n
⊢ ((if ¬a = a then count a ↑m else 0) + if a = a then count a ↑m else 0) = count a ↑m
state_after: no goals

tactic: rw [if_pos h, if_neg h.symm, add_zero]
state_before: case a.inr
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
h : a ≠ b
⊢ ((if ¬a = b then count b ↑m else 0) + if b = a then count a ↑m else 0) = count b ↑m
state_after: no goals
Theorem: CategoryTheory.SimplicialObject.δ_comp_σ_of_gt'
File: Mathlib/AlgebraicTopology/SimplicialObject.lean

tactic: simp only [Fin.not_lt_zero, hi] at H
state_before: C : Type u
inst✝ : Category.{v, u} C
X : SimplicialObject C
n : ℕ
i : Fin (n + 3)
j : Fin (n + 2)
H : j.succ < i
hi : i = 0
⊢ False
state_after: no goals

tactic: dsimp [δ, σ]
state_before: C : Type u
inst✝ : Category.{v, u} C
X : SimplicialObject C
n : ℕ
i : Fin (n + 3)
j : Fin (n + 2)
H : j.succ < i
⊢ X.σ j ≫ X.δ i = X.δ (i.pred ⋯) ≫ X.σ (j.castLT ⋯)
state_after: C : Type u
inst✝ : Category.{v, u} C
X : SimplicialObject C
n : ℕ
i : Fin (n + 3)
j : Fin (n + 2)
H : j.succ < i
⊢ X.map (SimplexCategory.σ j).op ≫ X.map (SimplexCategory.δ i).op =
    X.map (SimplexCategory.δ (i.pred ⋯)).op ≫ X.map (SimplexCategory.σ (j.castLT ⋯)).op

tactic: simp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_σ_of_gt' H]
state_before: C : Type u
inst✝ : Category.{v, u} C
X : SimplicialObject C
n : ℕ
i : Fin (n + 3)
j : Fin (n + 2)
H : j.succ < i
⊢ X.map (SimplexCategory.σ j).op ≫ X.map (SimplexCategory.δ i).op =
    X.map (SimplexCategory.δ (i.pred ⋯)).op ≫ X.map (SimplexCategory.σ (j.castLT ⋯)).op
state_after: no goals
Theorem: Submodule.isOrtho_iSup_right
File: Mathlib/Analysis/InnerProductSpace/Orthogonal.lean

tactic: simp_rw [isOrtho_comm]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace 𝕜 F
ι : Sort u_4
U : Submodule 𝕜 E
V : ι → Submodule 𝕜 E
⊢ (∀ (i : ι), V i ⟂ U) ↔ ∀ (i : ι), U ⟂ V i
state_after: no goals
Theorem: MulChar.ext
File: Mathlib/NumberTheory/MulChar/Basic.lean

tactic: apply ext'
state_before: R : Type u_1
inst✝¹ : CommMonoid R
R' : Type u_2
inst✝ : CommMonoidWithZero R'
χ χ' : MulChar R R'
h : ∀ (a : Rˣ), χ ↑a = χ' ↑a
⊢ χ = χ'
state_after: case h
R : Type u_1
inst✝¹ : CommMonoid R
R' : Type u_2
inst✝ : CommMonoidWithZero R'
χ χ' : MulChar R R'
h : ∀ (a : Rˣ), χ ↑a = χ' ↑a
⊢ ∀ (a : R), χ a = χ' a

tactic: intro a
state_before: case h
R : Type u_1
inst✝¹ : CommMonoid R
R' : Type u_2
inst✝ : CommMonoidWithZero R'
χ χ' : MulChar R R'
h : ∀ (a : Rˣ), χ ↑a = χ' ↑a
⊢ ∀ (a : R), χ a = χ' a
state_after: case h
R : Type u_1
inst✝¹ : CommMonoid R
R' : Type u_2
inst✝ : CommMonoidWithZero R'
χ χ' : MulChar R R'
h : ∀ (a : Rˣ), χ ↑a = χ' ↑a
a : R
⊢ χ a = χ' a

tactic: by_cases ha : IsUnit a
state_before: case h
R : Type u_1
inst✝¹ : CommMonoid R
R' : Type u_2
inst✝ : CommMonoidWithZero R'
χ χ' : MulChar R R'
h : ∀ (a : Rˣ), χ ↑a = χ' ↑a
a : R
⊢ χ a = χ' a
state_after: case pos
R : Type u_1
inst✝¹ : CommMonoid R
R' : Type u_2
inst✝ : CommMonoidWithZero R'
χ χ' : MulChar R R'
h : ∀ (a : Rˣ), χ ↑a = χ' ↑a
a : R
ha : IsUnit a
⊢ χ a = χ' a

case neg
R : Type u_1
inst✝¹ : CommMonoid R
R' : Type u_2
inst✝ : CommMonoidWithZero R'
χ χ' : MulChar R R'
h : ∀ (a : Rˣ), χ ↑a = χ' ↑a
a : R
ha : ¬IsUnit a
⊢ χ a = χ' a

tactic: exact h ha.unit
state_before: case pos
R : Type u_1
inst✝¹ : CommMonoid R
R' : Type u_2
inst✝ : CommMonoidWithZero R'
χ χ' : MulChar R R'
h : ∀ (a : Rˣ), χ ↑a = χ' ↑a
a : R
ha : IsUnit a
⊢ χ a = χ' a
state_after: no goals

tactic: rw [map_nonunit χ ha, map_nonunit χ' ha]
state_before: case neg
R : Type u_1
inst✝¹ : CommMonoid R
R' : Type u_2
inst✝ : CommMonoidWithZero R'
χ χ' : MulChar R R'
h : ∀ (a : Rˣ), χ ↑a = χ' ↑a
a : R
ha : ¬IsUnit a
⊢ χ a = χ' a
state_after: no goals
Theorem: MvPFunctor.M.dest_map
File: Mathlib/Data/PFunctor/Multivariate/M.lean

tactic: cases' x with a f
state_before: n : ℕ
P : MvPFunctor.{u} (n + 1)
α β : TypeVec.{u} n
g : α ⟹ β
x : P.M α
⊢ dest P (g <$$> x) = (g ::: fun x => g <$$> x) <$$> dest P x
state_after: case mk
n : ℕ
P : MvPFunctor.{u} (n + 1)
α β : TypeVec.{u} n
g : α ⟹ β
a : P.mp.A
f : P.mp.B a ⟹ α
⊢ dest P (g <$$> ⟨a, f⟩) = (g ::: fun x => g <$$> x) <$$> dest P ⟨a, f⟩

tactic: rw [map_eq]
state_before: case mk
n : ℕ
P : MvPFunctor.{u} (n + 1)
α β : TypeVec.{u} n
g : α ⟹ β
a : P.mp.A
f : P.mp.B a ⟹ α
⊢ dest P (g <$$> ⟨a, f⟩) = (g ::: fun x => g <$$> x) <$$> dest P ⟨a, f⟩
state_after: case mk
n : ℕ
P : MvPFunctor.{u} (n + 1)
α β : TypeVec.{u} n
g : α ⟹ β
a : P.mp.A
f : P.mp.B a ⟹ α
⊢ dest P ⟨a, g ⊚ f⟩ = (g ::: fun x => g <$$> x) <$$> dest P ⟨a, f⟩

tactic: conv =>
  rhs
  rw [M.dest, M.dest', map_eq, appendFun_comp_splitFun]
state_before: case mk
n : ℕ
P : MvPFunctor.{u} (n + 1)
α β : TypeVec.{u} n
g : α ⟹ β
a : P.mp.A
f : P.mp.B a ⟹ α
⊢ dest P ⟨a, g ⊚ f⟩ = (g ::: fun x => g <$$> x) <$$> dest P ⟨a, f⟩
state_after: case mk
n : ℕ
P : MvPFunctor.{u} (n + 1)
α β : TypeVec.{u} n
g : α ⟹ β
a : P.mp.A
f : P.mp.B a ⟹ α
⊢ dest P ⟨a, g ⊚ f⟩ =
    ⟨(PFunctor.M.dest ⟨a, f⟩.fst).fst,
      splitFun (g ⊚ pathDestLeft P ⋯ ⟨a, f⟩.snd)
        ((fun x => g <$$> x) ∘ fun x => ⟨(PFunctor.M.dest ⟨a, f⟩.fst).snd x, pathDestRight P ⋯ ⟨a, f⟩.snd x⟩)⟩

tactic: rfl
state_before: case mk
n : ℕ
P : MvPFunctor.{u} (n + 1)
α β : TypeVec.{u} n
g : α ⟹ β
a : P.mp.A
f : P.mp.B a ⟹ α
⊢ dest P ⟨a, g ⊚ f⟩ =
    ⟨(PFunctor.M.dest ⟨a, f⟩.fst).fst,
      splitFun (g ⊚ pathDestLeft P ⋯ ⟨a, f⟩.snd)
        ((fun x => g <$$> x) ∘ fun x => ⟨(PFunctor.M.dest ⟨a, f⟩.fst).snd x, pathDestRight P ⋯ ⟨a, f⟩.snd x⟩)⟩
state_after: no goals
Theorem: Eq.congr_left
File: .lake/packages/batteries/Batteries/Logic.lean

tactic: rw [h]
state_before: α : Sort u_1
x y z : α
h : x = y
⊢ x = z ↔ y = z
state_after: no goals
Theorem: Int.bodd_bit
File: Mathlib/Data/Int/Bitwise.lean

tactic: rw [bit_val]
state_before: b : Bool
n : ℤ
⊢ (bit b n).bodd = b
state_after: b : Bool
n : ℤ
⊢ (2 * n + bif b then 1 else 0).bodd = b

tactic: cases b <;> cases bodd n <;> simp [(show bodd 2 = false by rfl)]
state_before: b : Bool
n : ℤ
⊢ (2 * n + bif b then 1 else 0).bodd = b
state_after: no goals

tactic: rfl
state_before: n : ℤ
⊢ bodd 2 = false
state_after: no goals
Theorem: Finite.exists_min
File: Mathlib/Data/Fintype/Lattice.lean

tactic: cases nonempty_fintype α
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : Finite α
inst✝¹ : Nonempty α
inst✝ : LinearOrder β
f : α → β
⊢ ∃ x₀, ∀ (x : α), f x₀ ≤ f x
state_after: case intro
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : Finite α
inst✝¹ : Nonempty α
inst✝ : LinearOrder β
f : α → β
val✝ : Fintype α
⊢ ∃ x₀, ∀ (x : α), f x₀ ≤ f x

tactic: simpa using exists_min_image univ f univ_nonempty
state_before: case intro
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : Finite α
inst✝¹ : Nonempty α
inst✝ : LinearOrder β
f : α → β
val✝ : Fintype α
⊢ ∃ x₀, ∀ (x : α), f x₀ ≤ f x
state_after: no goals
Theorem: Ordinal.natCast_mod
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rw [← add_left_cancel, div_add_mod, ← natCast_div, ← natCast_mul, ← Nat.cast_add,
  Nat.div_add_mod]
state_before: m n : ℕ
⊢ ↑(m % n) = ↑m % ↑n
state_after: no goals
Theorem: IsFreeGroup.unique_lift
File: Mathlib/GroupTheory/FreeGroup/IsFreeGroup.lean

tactic: simpa only [Function.funext_iff] using lift.symm.bijective.existsUnique f
state_before: G : Type u_1
inst✝² : Group G
inst✝¹ : IsFreeGroup G
H : Type u_2
inst✝ : Group H
f : Generators G → H
⊢ ∃! F, ∀ (a : Generators G), F (of a) = f a
state_after: no goals
Theorem: Filter.frequently_principal
File: Mathlib/Order/Filter/Basic.lean

tactic: simp [Filter.Frequently, not_forall]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
a : Set α
p : α → Prop
⊢ (∃ᶠ (x : α) in 𝓟 a, p x) ↔ ∃ x ∈ a, p x
state_after: no goals
Theorem: ContDiffAt.neg
File: Mathlib/Analysis/Calculus/ContDiff/Basic.lean

tactic: rw [← contDiffWithinAt_univ] at *
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type u_2
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f✝ f₁ : E → F
g : F → G
x x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
f : E → F
hf : ContDiffAt 𝕜 n f x
⊢ ContDiffAt 𝕜 n (fun x => -f x) x
state_after: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type u_2
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f✝ f₁ : E → F
g : F → G
x x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
f : E → F
hf : ContDiffWithinAt 𝕜 n f univ x
⊢ ContDiffWithinAt 𝕜 n (fun x => -f x) univ x

tactic: exact hf.neg
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type u_2
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f✝ f₁ : E → F
g : F → G
x x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
f : E → F
hf : ContDiffWithinAt 𝕜 n f univ x
⊢ ContDiffWithinAt 𝕜 n (fun x => -f x) univ x
state_after: no goals
Theorem: Polynomial.ofFinsupp_single
File: Mathlib/Algebra/Polynomial/Basic.lean

tactic: simp [monomial]
state_before: R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n : ℕ
r : R
⊢ { toFinsupp := Finsupp.single n r } = (monomial n) r
state_after: no goals
Theorem: dist_anti_right_pi
File: Mathlib/Analysis/Normed/Order/UpperLower.lean

tactic: simpa only [dist_comm] using dist_anti_left_pi (y := x)
state_before: α : Type u_1
ι : Type u_2
inst✝ : Fintype ι
s t : Set (ι → ℝ)
a₁ a₂ b₁ b₂ x y : ι → ℝ
δ : ℝ
⊢ AntitoneOn (dist x) (Iic x)
state_after: no goals
Theorem: CauSeq.smul_equiv_smul
File: Mathlib/Algebra/Order/CauSeq/Basic.lean

tactic: simpa [const_smul, smul_one_mul _ _] using
  mul_equiv_mul (const_equiv.mpr <| Eq.refl <| c • (1 : β)) hf
state_before: α : Type u_1
β : Type u_2
inst✝⁴ : LinearOrderedField α
inst✝³ : Ring β
abv : β → α
inst✝² : IsAbsoluteValue abv
G : Type u_3
inst✝¹ : SMul G β
inst✝ : IsScalarTower G β β
f1 f2 : CauSeq β abv
c : G
hf : f1 ≈ f2
⊢ c • f1 ≈ c • f2
state_after: no goals
Theorem: LieIdeal.normalizer_eq_top
File: Mathlib/Algebra/Lie/CartanSubalgebra.lean

tactic: ext x
state_before: R✝ : Type u
L✝ : Type v
inst✝⁵ : CommRing R✝
inst✝⁴ : LieRing L✝
inst✝³ : LieAlgebra R✝ L✝
H : LieSubalgebra R✝ L✝
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
I : LieIdeal R L
⊢ (lieIdealSubalgebra R L I).normalizer = ⊤
state_after: case h
R✝ : Type u
L✝ : Type v
inst✝⁵ : CommRing R✝
inst✝⁴ : LieRing L✝
inst✝³ : LieAlgebra R✝ L✝
H : LieSubalgebra R✝ L✝
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
I : LieIdeal R L
x : L
⊢ x ∈ (lieIdealSubalgebra R L I).normalizer ↔ x ∈ ⊤

tactic: simpa only [LieSubalgebra.mem_normalizer_iff, LieSubalgebra.mem_top, iff_true_iff] using
  fun y hy => I.lie_mem hy
state_before: case h
R✝ : Type u
L✝ : Type v
inst✝⁵ : CommRing R✝
inst✝⁴ : LieRing L✝
inst✝³ : LieAlgebra R✝ L✝
H : LieSubalgebra R✝ L✝
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
I : LieIdeal R L
x : L
⊢ x ∈ (lieIdealSubalgebra R L I).normalizer ↔ x ∈ ⊤
state_after: no goals
Theorem: Function.Semiconj.inverses_right
File: Mathlib/Logic/Function/Conjugate.lean

tactic: rw [← hb (f (ga' x)), ← h.eq, ha x]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f fab : α → β
fbc : β → γ
ga ga' : α → α
gb gb' : β → β
gc gc' : γ → γ
h : Semiconj f ga gb
ha : RightInverse ga' ga
hb : LeftInverse gb' gb
x : α
⊢ f (ga' x) = gb' (f x)
state_after: no goals
Theorem: Nat.prime_iff_card_units
File: Mathlib/Data/Nat/Totient.lean

tactic: cases' eq_zero_or_neZero p with hp hp
state_before: p : ℕ
inst✝ : Fintype (ZMod p)ˣ
⊢ Prime p ↔ Fintype.card (ZMod p)ˣ = p - 1
state_after: case inl
p : ℕ
inst✝ : Fintype (ZMod p)ˣ
hp : p = 0
⊢ Prime p ↔ Fintype.card (ZMod p)ˣ = p - 1

case inr
p : ℕ
inst✝ : Fintype (ZMod p)ˣ
hp : NeZero p
⊢ Prime p ↔ Fintype.card (ZMod p)ˣ = p - 1

tactic: rw [ZMod.card_units_eq_totient, Nat.totient_eq_iff_prime <| NeZero.pos p]
state_before: case inr
p : ℕ
inst✝ : Fintype (ZMod p)ˣ
hp : NeZero p
⊢ Prime p ↔ Fintype.card (ZMod p)ˣ = p - 1
state_after: no goals

tactic: subst hp
state_before: case inl
p : ℕ
inst✝ : Fintype (ZMod p)ˣ
hp : p = 0
⊢ Prime p ↔ Fintype.card (ZMod p)ˣ = p - 1
state_after: case inl
inst✝ : Fintype (ZMod 0)ˣ
⊢ Prime 0 ↔ Fintype.card (ZMod 0)ˣ = 0 - 1

tactic: simp only [ZMod, not_prime_zero, false_iff_iff, zero_tsub]
state_before: case inl
inst✝ : Fintype (ZMod 0)ˣ
⊢ Prime 0 ↔ Fintype.card (ZMod 0)ˣ = 0 - 1
state_after: case inl
inst✝ : Fintype (ZMod 0)ˣ
⊢ ¬Fintype.card ℤˣ = 0

tactic: suffices Fintype.card ℤˣ ≠ 0 by convert this
state_before: case inl
inst✝ : Fintype (ZMod 0)ˣ
⊢ ¬Fintype.card ℤˣ = 0
state_after: case inl
inst✝ : Fintype (ZMod 0)ˣ
⊢ Fintype.card ℤˣ ≠ 0

tactic: simp
state_before: case inl
inst✝ : Fintype (ZMod 0)ˣ
⊢ Fintype.card ℤˣ ≠ 0
state_after: no goals

tactic: convert this
state_before: inst✝ : Fintype (ZMod 0)ˣ
this : Fintype.card ℤˣ ≠ 0
⊢ ¬Fintype.card ℤˣ = 0
state_after: no goals
Theorem: AmpleSet.union
File: Mathlib/Analysis/Convex/AmpleSet.lean

tactic: intro x hx
state_before: F : Type u_1
inst✝² : AddCommGroup F
inst✝¹ : Module ℝ F
inst✝ : TopologicalSpace F
s t : Set F
hs : AmpleSet s
ht : AmpleSet t
⊢ AmpleSet (s ∪ t)
state_after: F : Type u_1
inst✝² : AddCommGroup F
inst✝¹ : Module ℝ F
inst✝ : TopologicalSpace F
s t : Set F
hs : AmpleSet s
ht : AmpleSet t
x : F
hx : x ∈ s ∪ t
⊢ (convexHull ℝ) (connectedComponentIn (s ∪ t) x) = univ

tactic: rcases hx with (h | h) <;>
[have hx := hs x h; have hx := ht x h] <;>
rw [← Set.univ_subset_iff, ← hx] <;>
apply convexHull_mono <;>
apply connectedComponentIn_mono <;>
[apply subset_union_left; apply subset_union_right]
state_before: F : Type u_1
inst✝² : AddCommGroup F
inst✝¹ : Module ℝ F
inst✝ : TopologicalSpace F
s t : Set F
hs : AmpleSet s
ht : AmpleSet t
x : F
hx : x ∈ s ∪ t
⊢ (convexHull ℝ) (connectedComponentIn (s ∪ t) x) = univ
state_after: no goals
Theorem: CategoryTheory.GradedObject.CofanMapObjFun.ιMapObj_iso_inv
File: Mathlib/CategoryTheory/GradedObject.lean

tactic: apply IsColimit.comp_coconePointUniqueUpToIso_inv
state_before: I : Type u_1
J : Type u_2
K : Type u_3
C : Type u_4
inst✝⁴ : Category.{u_5, u_4} C
X Y Z : GradedObject I C
φ : X ⟶ Y
e : X ≅ Y
ψ : Y ⟶ Z
p : I → J
j : J
inst✝³ : X.HasMap p
inst✝² : Y.HasMap p
inst✝¹ : Z.HasMap p
c : X.CofanMapObjFun p j
hc : IsColimit c
inst✝ : X.HasMap p
i : I
hi : p i = j
⊢ X.ιMapObj p i j hi ≫ (iso hc).inv = Cofan.inj c ⟨i, hi⟩
state_after: no goals
Theorem: Finset.prod_insert_div
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: simp [ha]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝² : CommMonoid β
M : Type u_6
inst✝¹ : CommGroup M
inst✝ : DecidableEq α
ha : a ∉ s
f : α → M
⊢ (∏ x ∈ insert a s, f x) / f a = ∏ x ∈ s, f x
state_after: no goals
Theorem: Batteries.RBNode.forIn_eq_forIn_toList
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: conv => lhs; simp only [forIn, RBNode.forIn]
state_before: m : Type u_1 → Type u_2
α : Type u_3
α✝ : Type u_1
init : α✝
f : α → α✝ → m (ForInStep α✝)
inst✝¹ : Monad m
inst✝ : LawfulMonad m
t : RBNode α
⊢ forIn t init f = forIn t.toList init f
state_after: m : Type u_1 → Type u_2
α : Type u_3
α✝ : Type u_1
init : α✝
f : α → α✝ → m (ForInStep α✝)
inst✝¹ : Monad m
inst✝ : LawfulMonad m
t : RBNode α
⊢ ForInStep.run <$> forIn.visit f t init = forIn t.toList init f

tactic: rw [List.forIn_eq_bindList, forIn_visit_eq_bindList]
state_before: m : Type u_1 → Type u_2
α : Type u_3
α✝ : Type u_1
init : α✝
f : α → α✝ → m (ForInStep α✝)
inst✝¹ : Monad m
inst✝ : LawfulMonad m
t : RBNode α
⊢ ForInStep.run <$> forIn.visit f t init = forIn t.toList init f
state_after: no goals
Theorem: MeasureTheory.Integrable.simpleFunc_mul'
File: Mathlib/MeasureTheory/Integral/SetIntegral.lean

tactic: rw [← SimpleFunc.coe_toLargerSpace_eq hm g]
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝ : MeasurableSpace X
f : X → ℝ
m m0 : MeasurableSpace X
μ : Measure X
hm : m ≤ m0
g : SimpleFunc X ℝ
hf : Integrable f μ
⊢ Integrable (↑g * f) μ
state_after: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝ : MeasurableSpace X
f : X → ℝ
m m0 : MeasurableSpace X
μ : Measure X
hm : m ≤ m0
g : SimpleFunc X ℝ
hf : Integrable f μ
⊢ Integrable (↑(SimpleFunc.toLargerSpace hm g) * f) μ

tactic: exact hf.simpleFunc_mul (g.toLargerSpace hm)
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝ : MeasurableSpace X
f : X → ℝ
m m0 : MeasurableSpace X
μ : Measure X
hm : m ≤ m0
g : SimpleFunc X ℝ
hf : Integrable f μ
⊢ Integrable (↑(SimpleFunc.toLargerSpace hm g) * f) μ
state_after: no goals
Theorem: Set.prod_iUnion
File: Mathlib/Data/Set/Lattice.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
s : Set α
t : ι → Set β
⊢ s ×ˢ ⋃ i, t i = ⋃ i, s ×ˢ t i
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
s : Set α
t : ι → Set β
x✝ : α × β
⊢ x✝ ∈ s ×ˢ ⋃ i, t i ↔ x✝ ∈ ⋃ i, s ×ˢ t i

tactic: simp
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
s : Set α
t : ι → Set β
x✝ : α × β
⊢ x✝ ∈ s ×ˢ ⋃ i, t i ↔ x✝ ∈ ⋃ i, s ×ˢ t i
state_after: no goals
Theorem: PadicInt.zmod_congr_of_sub_mem_span
File: Mathlib/NumberTheory/Padics/RingHoms.lean

tactic: simpa using zmod_congr_of_sub_mem_span_aux n x a b ha hb
state_before: p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
n : ℕ
x : ℤ_[p]
a b : ℕ
ha : x - ↑a ∈ Ideal.span {↑p ^ n}
hb : x - ↑b ∈ Ideal.span {↑p ^ n}
⊢ ↑a = ↑b
state_after: no goals
Theorem: Function.iterate_pred_comp_of_pos
File: Mathlib/Logic/Function/Iterate.lean

tactic: rw [← iterate_succ, Nat.succ_pred_eq_of_pos hn]
state_before: α : Type u
β : Type v
f : α → α
n : ℕ
hn : 0 < n
⊢ f^[n.pred] ∘ f = f^[n]
state_after: no goals
Theorem: Monotone.map_ciSup_of_continuousAt
File: Mathlib/Topology/Order/Monotone.lean

tactic: rw [iSup, Mf.map_csSup_of_continuousAt Cf (range_nonempty _) H, ← range_comp, iSup]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁶ : ConditionallyCompleteLinearOrder α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : OrderTopology α
inst✝³ : ConditionallyCompleteLinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderClosedTopology β
inst✝ : Nonempty γ
f : α → β
g : γ → α
Cf : ContinuousAt f (⨆ i, g i)
Mf : Monotone f
H : BddAbove (range g)
⊢ f (⨆ i, g i) = ⨆ i, f (g i)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁶ : ConditionallyCompleteLinearOrder α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : OrderTopology α
inst✝³ : ConditionallyCompleteLinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderClosedTopology β
inst✝ : Nonempty γ
f : α → β
g : γ → α
Cf : ContinuousAt f (⨆ i, g i)
Mf : Monotone f
H : BddAbove (range g)
⊢ sSup (range (f ∘ fun i => g i)) = sSup (range fun i => f (g i))

tactic: rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁶ : ConditionallyCompleteLinearOrder α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : OrderTopology α
inst✝³ : ConditionallyCompleteLinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderClosedTopology β
inst✝ : Nonempty γ
f : α → β
g : γ → α
Cf : ContinuousAt f (⨆ i, g i)
Mf : Monotone f
H : BddAbove (range g)
⊢ sSup (range (f ∘ fun i => g i)) = sSup (range fun i => f (g i))
state_after: no goals
Theorem: SimpleGraph.Subgraph.edgeSet_bot
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: simp
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : G.Subgraph
a b : V
⊢ ∀ (x y : V), s(x, y) ∈ ⊥.edgeSet ↔ s(x, y) ∈ ∅
state_after: no goals
Theorem: CommGrp.epi_iff_surjective
File: Mathlib/Algebra/Category/Grp/EpiMono.lean

tactic: rw [epi_iff_range_eq_top, MonoidHom.range_top_iff_surjective]
state_before: A B : CommGrp
f : A ⟶ B
⊢ Epi f ↔ Function.Surjective ⇑f
state_after: no goals