1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Ring.multichoose_two
File: Mathlib/RingTheory/Binomial.lean

tactic: induction k with
| zero =>
  rw [multichoose_zero_right, Nat.cast_zero, zero_add]
| succ n ih =>
  rw [one_add_one_eq_two.symm, multichoose_succ_succ, multichoose_one, one_add_one_eq_two, ih,
    Nat.cast_succ, add_comm]
state_before: R✝ : Type u_1
inst✝⁶ : AddCommMonoid R✝
inst✝⁵ : Pow R✝ ℕ
inst✝⁴ : BinomialRing R✝
R : Type u_2
inst✝³ : NonAssocSemiring R
inst✝² : Pow R ℕ
inst✝¹ : NatPowAssoc R
inst✝ : BinomialRing R
k : ℕ
⊢ multichoose 2 k = ↑k + 1
state_after: no goals

tactic: rw [multichoose_zero_right, Nat.cast_zero, zero_add]
state_before: case zero
R✝ : Type u_1
inst✝⁶ : AddCommMonoid R✝
inst✝⁵ : Pow R✝ ℕ
inst✝⁴ : BinomialRing R✝
R : Type u_2
inst✝³ : NonAssocSemiring R
inst✝² : Pow R ℕ
inst✝¹ : NatPowAssoc R
inst✝ : BinomialRing R
⊢ multichoose 2 0 = ↑0 + 1
state_after: no goals

tactic: rw [one_add_one_eq_two.symm, multichoose_succ_succ, multichoose_one, one_add_one_eq_two, ih,
  Nat.cast_succ, add_comm]
state_before: case succ
R✝ : Type u_1
inst✝⁶ : AddCommMonoid R✝
inst✝⁵ : Pow R✝ ℕ
inst✝⁴ : BinomialRing R✝
R : Type u_2
inst✝³ : NonAssocSemiring R
inst✝² : Pow R ℕ
inst✝¹ : NatPowAssoc R
inst✝ : BinomialRing R
n : ℕ
ih : multichoose 2 n = ↑n + 1
⊢ multichoose 2 (n + 1) = ↑(n + 1) + 1
state_after: no goals
Theorem: EMetric.mem_ball_comm
File: Mathlib/Topology/EMetricSpace/Basic.lean

tactic: rw [mem_ball', mem_ball]
state_before: α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s t : Set α
⊢ x ∈ ball y ε ↔ y ∈ ball x ε
state_after: no goals
Theorem: List.sublist_replicate_iff
File: Mathlib/Data/List/Basic.lean

tactic: rintro ⟨k, h, rfl⟩
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ l : List α
a : α
n : ℕ
⊢ (∃ k, k ≤ n ∧ l = replicate k a) → l <+ replicate n a
state_after: case intro.intro
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
a : α
n k : ℕ
h : k ≤ n
⊢ replicate k a <+ replicate n a

tactic: exact (replicate_sublist_replicate _).mpr h
state_before: case intro.intro
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
a : α
n k : ℕ
h : k ≤ n
⊢ replicate k a <+ replicate n a
state_after: no goals
Theorem: LipschitzWith.mk_one
File: Mathlib/Topology/MetricSpace/Lipschitz.lean

tactic: simpa only [NNReal.coe_one, one_mul] using h
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
inst✝ : PseudoMetricSpace γ
K : ℝ≥0
f : α → β
x y : α
r : ℝ
h : ∀ (x y : α), dist (f x) (f y) ≤ dist x y
⊢ ∀ (x y : α), dist (f x) (f y) ≤ ↑1 * dist x y
state_after: no goals
Theorem: Sym.map_id'
File: Mathlib/Data/Sym/Basic.lean

tactic: ext
state_before: α✝ : Type u_1
β : Type u_2
n✝ n' m : ℕ
s✝ : Sym α✝ n✝
a b : α✝
α : Type u_3
n : ℕ
s : Sym α n
⊢ map (fun x => x) s = s
state_after: case h
α✝ : Type u_1
β : Type u_2
n✝ n' m : ℕ
s✝ : Sym α✝ n✝
a b : α✝
α : Type u_3
n : ℕ
s : Sym α n
⊢ ↑(map (fun x => x) s) = ↑s

tactic: simp only [map, val_eq_coe, Multiset.map_id', coe_inj]
state_before: case h
α✝ : Type u_1
β : Type u_2
n✝ n' m : ℕ
s✝ : Sym α✝ n✝
a b : α✝
α : Type u_3
n : ℕ
s : Sym α n
⊢ ↑(map (fun x => x) s) = ↑s
state_after: case h
α✝ : Type u_1
β : Type u_2
n✝ n' m : ℕ
s✝ : Sym α✝ n✝
a b : α✝
α : Type u_3
n : ℕ
s : Sym α n
⊢ ⟨↑s, ⋯⟩ = s

tactic: rfl
state_before: case h
α✝ : Type u_1
β : Type u_2
n✝ n' m : ℕ
s✝ : Sym α✝ n✝
a b : α✝
α : Type u_3
n : ℕ
s : Sym α n
⊢ ⟨↑s, ⋯⟩ = s
state_after: no goals
Theorem: ENNReal.inv_le_one
File: Mathlib/Data/ENNReal/Inv.lean

tactic: rw [inv_le_iff_inv_le, inv_one]
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ a⁻¹ ≤ 1 ↔ 1 ≤ a
state_after: no goals
Theorem: div_le_div_of_nonneg_left
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [div_eq_mul_inv, div_eq_mul_inv]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 ≤ a
hc : 0 < c
h : c ≤ b
⊢ a / b ≤ a / c
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 ≤ a
hc : 0 < c
h : c ≤ b
⊢ a * b⁻¹ ≤ a * c⁻¹

tactic: exact mul_le_mul_of_nonneg_left ((inv_le_inv (hc.trans_le h) hc).mpr h) ha
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 ≤ a
hc : 0 < c
h : c ≤ b
⊢ a * b⁻¹ ≤ a * c⁻¹
state_after: no goals
Theorem: Polynomial.card_support_eraseLead
File: Mathlib/Algebra/Polynomial/EraseLead.lean

tactic: by_cases hf : f = 0
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
⊢ f.eraseLead.support.card = f.support.card - 1
state_after: case pos
R : Type u_1
inst✝ : Semiring R
f : R[X]
hf : f = 0
⊢ f.eraseLead.support.card = f.support.card - 1

case neg
R : Type u_1
inst✝ : Semiring R
f : R[X]
hf : ¬f = 0
⊢ f.eraseLead.support.card = f.support.card - 1

tactic: rw [hf, eraseLead_zero, support_zero, card_empty]
state_before: case pos
R : Type u_1
inst✝ : Semiring R
f : R[X]
hf : f = 0
⊢ f.eraseLead.support.card = f.support.card - 1
state_after: no goals

tactic: rw [← card_support_eraseLead_add_one hf, add_tsub_cancel_right]
state_before: case neg
R : Type u_1
inst✝ : Semiring R
f : R[X]
hf : ¬f = 0
⊢ f.eraseLead.support.card = f.support.card - 1
state_after: no goals
Theorem: MeromorphicOn.neg_iff
File: Mathlib/Analysis/Analytic/Meromorphic.lean

tactic: simpa only [neg_neg] using h.neg
state_before: 𝕜 : Type u_1
inst✝² : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
s t : 𝕜 → 𝕜
f g : 𝕜 → E
U : Set 𝕜
hs : MeromorphicOn s U
ht : MeromorphicOn t U
hf : MeromorphicOn f U
hg : MeromorphicOn g U
h : MeromorphicOn (-f) U
⊢ MeromorphicOn f U
state_after: no goals
Theorem: div_sub_div_same
File: Mathlib/Algebra/Field/Basic.lean

tactic: rw [sub_eq_add_neg, ← neg_div, div_add_div_same, sub_eq_add_neg]
state_before: α : Type u_1
β : Type u_2
K : Type u_3
inst✝ : DivisionRing K
a✝ b✝ c✝ d a b c : K
⊢ a / c - b / c = (a - b) / c
state_after: no goals
Theorem: IsArtinian.eventuallyConst_of_isArtinian
File: Mathlib/RingTheory/Artinian.lean

tactic: simp_rw [eventuallyConst_atTop, eq_comm]
state_before: R : Type u_1
M : Type u_2
inst✝³ : Ring R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : IsArtinian R M
f : ℕ →o (Submodule R M)ᵒᵈ
⊢ EventuallyConst (⇑f) atTop
state_after: R : Type u_1
M : Type u_2
inst✝³ : Ring R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : IsArtinian R M
f : ℕ →o (Submodule R M)ᵒᵈ
⊢ ∃ i, ∀ (j : ℕ), i ≤ j → f i = f j

tactic: exact monotone_stabilizes f
state_before: R : Type u_1
M : Type u_2
inst✝³ : Ring R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : IsArtinian R M
f : ℕ →o (Submodule R M)ᵒᵈ
⊢ ∃ i, ∀ (j : ℕ), i ≤ j → f i = f j
state_after: no goals
Theorem: star_lt_one_iff
File: Mathlib/Algebra/Star/Order.lean

tactic: simpa using star_lt_star_iff (x := x) (y := 1)
state_before: R : Type u
inst✝³ : Semiring R
inst✝² : PartialOrder R
inst✝¹ : StarRing R
inst✝ : StarOrderedRing R
x : R
⊢ star x < 1 ↔ x < 1
state_after: no goals
Theorem: Mathlib.Tactic.Ring.cast_pos
File: Mathlib/Tactic/Ring/Basic.lean

tactic: simp [e]
state_before: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a : R
n : ℕ
e : a = ↑n
⊢ a = n.rawCast + 0
state_after: no goals
Theorem: Finset.Ico_subset_Iio_self
File: Mathlib/Order/Interval/Finset/Basic.lean

tactic: simpa [← coe_subset] using Set.Ico_subset_Iio_self
state_before: ι : Type u_1
α : Type u_2
inst✝² : Preorder α
inst✝¹ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
inst✝ : LocallyFiniteOrderBot α
⊢ Ico a b ⊆ Iio b
state_after: no goals
Theorem: Finset.centerMass_empty
File: Mathlib/Analysis/Convex/Combination.lean

tactic: simp only [centerMass, sum_empty, smul_zero]
state_before: R : Type u_1
R' : Type u_2
E : Type u_3
F : Type u_4
ι : Type u_5
ι' : Type u_6
α : Type u_7
inst✝⁸ : LinearOrderedField R
inst✝⁷ : LinearOrderedField R'
inst✝⁶ : AddCommGroup E
inst✝⁵ : AddCommGroup F
inst✝⁴ : LinearOrderedAddCommGroup α
inst✝³ : Module R E
inst✝² : Module R F
inst✝¹ : Module R α
inst✝ : OrderedSMul R α
s : Set E
i j : ι
c : R
t : Finset ι
w : ι → R
z : ι → E
⊢ ∅.centerMass w z = 0
state_after: no goals
Theorem: CategoryTheory.StructuredArrow.w
File: Mathlib/CategoryTheory/Comma/StructuredArrow.lean

tactic: have := f.w
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
S S' S'' : D
Y Y' Y'' : C
T T' : C ⥤ D
A B : StructuredArrow S T
f : A ⟶ B
⊢ A.hom ≫ T.map f.right = B.hom
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
S S' S'' : D
Y Y' Y'' : C
T T' : C ⥤ D
A B : StructuredArrow S T
f : A ⟶ B
this : (Functor.fromPUnit S).map f.left ≫ B.hom = A.hom ≫ T.map f.right
⊢ A.hom ≫ T.map f.right = B.hom

tactic: aesop_cat
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
S S' S'' : D
Y Y' Y'' : C
T T' : C ⥤ D
A B : StructuredArrow S T
f : A ⟶ B
this : (Functor.fromPUnit S).map f.left ≫ B.hom = A.hom ≫ T.map f.right
⊢ A.hom ≫ T.map f.right = B.hom
state_after: no goals
Theorem: measurable_findGreatest
File: Mathlib/MeasureTheory/MeasurableSpace/Basic.lean

tactic: refine measurable_findGreatest' fun k hk => ?_
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ k ≤ N, MeasurableSet {x | p x k}
⊢ Measurable fun x => Nat.findGreatest (p x) N
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ k ≤ N, MeasurableSet {x | p x k}
k : ℕ
hk : k ≤ N
⊢ MeasurableSet {x | Nat.findGreatest (p x) N = k}

tactic: simp only [Nat.findGreatest_eq_iff, setOf_and, setOf_forall, ← compl_setOf]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ k ≤ N, MeasurableSet {x | p x k}
k : ℕ
hk : k ≤ N
⊢ MeasurableSet {x | Nat.findGreatest (p x) N = k}
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ k ≤ N, MeasurableSet {x | p x k}
k : ℕ
hk : k ≤ N
⊢ MeasurableSet ({a | k ≤ N} ∩ ((⋂ (_ : k ≠ 0), {x | p x k}) ∩ ⋂ i, ⋂ (_ : k < i), ⋂ (_ : i ≤ N), {a | p a i}ᶜ))

tactic: repeat' apply_rules [MeasurableSet.inter, MeasurableSet.const, MeasurableSet.iInter,
  MeasurableSet.compl, hN] <;> try intros
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ k ≤ N, MeasurableSet {x | p x k}
k : ℕ
hk : k ≤ N
⊢ MeasurableSet ({a | k ≤ N} ∩ ((⋂ (_ : k ≠ 0), {x | p x k}) ∩ ⋂ i, ⋂ (_ : k < i), ⋂ (_ : i ≤ N), {a | p a i}ᶜ))
state_after: no goals

tactic: apply_rules [MeasurableSet.inter, MeasurableSet.const, MeasurableSet.iInter,
MeasurableSet.compl, hN] <;> try intros
state_before: case h₂.h₂
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ k ≤ N, MeasurableSet {x | p x k}
k : ℕ
hk : k ≤ N
b✝² : ℕ
b✝¹ : k < b✝²
b✝ : b✝² ≤ N
⊢ MeasurableSet {a | p a b✝²}ᶜ
state_after: no goals

tactic: intros
state_before: case h₂.h₂
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ k ≤ N, MeasurableSet {x | p x k}
k : ℕ
hk : k ≤ N
b✝¹ : ℕ
b✝ : k < b✝¹
⊢ b✝¹ ≤ N → MeasurableSet {a | p a b✝¹}ᶜ
state_after: case h₂.h₂
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p : α → ℕ → Prop
inst✝ : (x : α) → DecidablePred (p x)
N : ℕ
hN : ∀ k ≤ N, MeasurableSet {x | p x k}
k : ℕ
hk : k ≤ N
b✝² : ℕ
b✝¹ : k < b✝²
b✝ : b✝² ≤ N
⊢ MeasurableSet {a | p a b✝²}ᶜ
Theorem: iSup_inf_eq
File: Mathlib/Order/CompleteBooleanAlgebra.lean

tactic: rw [iSup, sSup_inf_eq, iSup_range]
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : Frame α
s t : Set α
a✝ b : α
f : ι → α
a : α
⊢ (⨆ i, f i) ⊓ a = ⨆ i, f i ⊓ a
state_after: no goals
Theorem: subset_exterior_iff
File: Mathlib/Topology/AlexandrovDiscrete.lean

tactic: simp [exterior_def]
state_before: ι : Sort u_1
κ : ι → Sort u_2
α : Type u_3
β : Type u_4
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t : Set α
a x y : α
⊢ s ⊆ exterior t ↔ ∀ (U : Set α), IsOpen U → t ⊆ U → s ⊆ U
state_after: no goals
Theorem: EReal.neg_le
File: Mathlib/Data/Real/EReal.lean

tactic: rw [← neg_le_neg_iff, neg_neg]
state_before: a b : EReal
⊢ -a ≤ b ↔ -b ≤ a
state_after: no goals
Theorem: Ordinal.add_le_of_forall_add_lt
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: have H : a + (c - a) = c :=
  Ordinal.add_sub_cancel_of_le
    (by
      rw [← add_zero a]
      exact (h _ hb).le)
state_before: a b c : Ordinal.{u_1}
hb : 0 < b
h : ∀ d < b, a + d < c
⊢ a + b ≤ c
state_after: a b c : Ordinal.{u_1}
hb : 0 < b
h : ∀ d < b, a + d < c
H : a + (c - a) = c
⊢ a + b ≤ c

tactic: rw [← H]
state_before: a b c : Ordinal.{u_1}
hb : 0 < b
h : ∀ d < b, a + d < c
H : a + (c - a) = c
⊢ a + b ≤ c
state_after: a b c : Ordinal.{u_1}
hb : 0 < b
h : ∀ d < b, a + d < c
H : a + (c - a) = c
⊢ a + b ≤ a + (c - a)

tactic: apply add_le_add_left _ a
state_before: a b c : Ordinal.{u_1}
hb : 0 < b
h : ∀ d < b, a + d < c
H : a + (c - a) = c
⊢ a + b ≤ a + (c - a)
state_after: a b c : Ordinal.{u_1}
hb : 0 < b
h : ∀ d < b, a + d < c
H : a + (c - a) = c
⊢ b ≤ c - a

tactic: by_contra! hb
state_before: a b c : Ordinal.{u_1}
hb : 0 < b
h : ∀ d < b, a + d < c
H : a + (c - a) = c
⊢ b ≤ c - a
state_after: a b c : Ordinal.{u_1}
hb✝ : 0 < b
h : ∀ d < b, a + d < c
H : a + (c - a) = c
hb : c - a < b
⊢ False

tactic: exact (h _ hb).ne H
state_before: a b c : Ordinal.{u_1}
hb✝ : 0 < b
h : ∀ d < b, a + d < c
H : a + (c - a) = c
hb : c - a < b
⊢ False
state_after: no goals

tactic: rw [← add_zero a]
state_before: a b c : Ordinal.{u_1}
hb : 0 < b
h : ∀ d < b, a + d < c
⊢ a ≤ c
state_after: a b c : Ordinal.{u_1}
hb : 0 < b
h : ∀ d < b, a + d < c
⊢ a + 0 ≤ c

tactic: exact (h _ hb).le
state_before: a b c : Ordinal.{u_1}
hb : 0 < b
h : ∀ d < b, a + d < c
⊢ a + 0 ≤ c
state_after: no goals
Theorem: Finset.toColex_ne_toColex
File: Mathlib/Combinatorics/Colex.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
s t : Finset α
⊢ { ofColex := s } ≠ { ofColex := t } ↔ s ≠ t
state_after: no goals
Theorem: abs_sub_lt_iff
File: Mathlib/Algebra/Order/Group/Abs.lean

tactic: rw [@abs_lt α, neg_lt_sub_iff_lt_add', sub_lt_iff_lt_add', and_comm, sub_lt_iff_lt_add']
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
⊢ |a - b| < c ↔ a - b < c ∧ b - a < c
state_after: no goals
Theorem: Polynomial.mem_roots_iff_aeval_eq_zero
File: Mathlib/Algebra/Polynomial/Roots.lean

tactic: rw [mem_roots w, IsRoot.def, aeval_def, eval₂_eq_eval_map]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
x : R
w : p ≠ 0
⊢ x ∈ p.roots ↔ (aeval x) p = 0
state_after: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
x : R
w : p ≠ 0
⊢ eval x p = 0 ↔ eval x (map (algebraMap R R) p) = 0

tactic: simp
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
x : R
w : p ≠ 0
⊢ eval x p = 0 ↔ eval x (map (algebraMap R R) p) = 0
state_after: no goals
Theorem: Denumerable.raise_lower'
File: Mathlib/Logic/Equiv/List.lean

tactic: have : n ≤ m := h₁ _ (l.mem_cons_self _)
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Denumerable α
inst✝ : Denumerable β
m : ℕ
l : List ℕ
n : ℕ
h₁ : ∀ m_1 ∈ m :: l, n ≤ m_1
h₂ : Sorted (fun x x_1 => x < x_1) (m :: l)
⊢ raise' (lower' (m :: l) n) n = m :: l
state_after: α : Type u_1
β : Type u_2
inst✝¹ : Denumerable α
inst✝ : Denumerable β
m : ℕ
l : List ℕ
n : ℕ
h₁ : ∀ m_1 ∈ m :: l, n ≤ m_1
h₂ : Sorted (fun x x_1 => x < x_1) (m :: l)
this : n ≤ m
⊢ raise' (lower' (m :: l) n) n = m :: l

tactic: simp [raise', lower', Nat.sub_add_cancel this,
  raise_lower' (List.rel_of_sorted_cons h₂ : ∀ a ∈ l, m < a) h₂.of_cons]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Denumerable α
inst✝ : Denumerable β
m : ℕ
l : List ℕ
n : ℕ
h₁ : ∀ m_1 ∈ m :: l, n ≤ m_1
h₂ : Sorted (fun x x_1 => x < x_1) (m :: l)
this : n ≤ m
⊢ raise' (lower' (m :: l) n) n = m :: l
state_after: no goals
Theorem: MeasureTheory.stoppedValue_piecewise_const'
File: Mathlib/Probability/Process/Stopping.lean

tactic: ext ω
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
𝒢 : Filtration ι m
τ η : Ω → ι
i✝ j✝ : ι
s : Set Ω
inst✝ : DecidablePred fun x => x ∈ s
ι' : Type u_4
i j : ι'
f : ι' → Ω → ℝ
⊢ stoppedValue f (s.piecewise (fun x => i) fun x => j) = s.indicator (f i) + sᶜ.indicator (f j)
state_after: case h
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
𝒢 : Filtration ι m
τ η : Ω → ι
i✝ j✝ : ι
s : Set Ω
inst✝ : DecidablePred fun x => x ∈ s
ι' : Type u_4
i j : ι'
f : ι' → Ω → ℝ
ω : Ω
⊢ stoppedValue f (s.piecewise (fun x => i) fun x => j) ω = (s.indicator (f i) + sᶜ.indicator (f j)) ω

tactic: rw [stoppedValue]
state_before: case h
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
𝒢 : Filtration ι m
τ η : Ω → ι
i✝ j✝ : ι
s : Set Ω
inst✝ : DecidablePred fun x => x ∈ s
ι' : Type u_4
i j : ι'
f : ι' → Ω → ℝ
ω : Ω
⊢ stoppedValue f (s.piecewise (fun x => i) fun x => j) ω = (s.indicator (f i) + sᶜ.indicator (f j)) ω
state_after: case h
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
𝒢 : Filtration ι m
τ η : Ω → ι
i✝ j✝ : ι
s : Set Ω
inst✝ : DecidablePred fun x => x ∈ s
ι' : Type u_4
i j : ι'
f : ι' → Ω → ℝ
ω : Ω
⊢ f (s.piecewise (fun x => i) (fun x => j) ω) ω = (s.indicator (f i) + sᶜ.indicator (f j)) ω

tactic: by_cases hx : ω ∈ s <;> simp [hx]
state_before: case h
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
𝒢 : Filtration ι m
τ η : Ω → ι
i✝ j✝ : ι
s : Set Ω
inst✝ : DecidablePred fun x => x ∈ s
ι' : Type u_4
i j : ι'
f : ι' → Ω → ℝ
ω : Ω
⊢ f (s.piecewise (fun x => i) (fun x => j) ω) ω = (s.indicator (f i) + sᶜ.indicator (f j)) ω
state_after: no goals
Theorem: IsNowhereDense.closure
File: Mathlib/Topology/GDelta.lean

tactic: rwa [IsNowhereDense, closure_closure]
state_before: X✝ : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
X : Type u_5
inst✝ : TopologicalSpace X
s : Set X
hs : IsNowhereDense s
⊢ IsNowhereDense (closure s)
state_after: no goals
Theorem: Finset.insert_subset_iff
File: Mathlib/Data/Finset/Basic.lean

tactic: simp only [subset_iff, mem_insert, forall_eq, or_imp, forall_and]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s t u v : Finset α
a b : α
⊢ insert a s ⊆ t ↔ a ∈ t ∧ s ⊆ t
state_after: no goals
Theorem: PartialEquiv.isImage_source_target_of_disjoint
File: Mathlib/Logic/Equiv/PartialEquiv.lean

tactic: rw [hs.inter_eq, ht.inter_eq, image_empty]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e'✝ : PartialEquiv β γ
e' : PartialEquiv α β
hs : Disjoint e.source e'.source
ht : Disjoint e.target e'.target
⊢ ↑e '' (e.source ∩ e'.source) = e.target ∩ e'.target
state_after: no goals
Theorem: Set.enumerate_mem
File: Mathlib/Data/Set/Enumerate.lean

tactic: cases h : sel s with
| none => simp [enumerate_eq_none_of_sel, h]
| some a' =>
  simp only [enumerate, h, Nat.add_eq, add_zero]
  exact fun h' : enumerate sel (s \ {a'}) n = some a ↦
    have : a ∈ s \ {a'} := enumerate_mem h_sel h'
    this.left
state_before: α : Type u_1
sel : Set α → Option α
h_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s
s : Set α
n : ℕ
a : α
⊢ enumerate sel s (n + 1) = some a → a ∈ s
state_after: no goals

tactic: simp [enumerate_eq_none_of_sel, h]
state_before: case none
α : Type u_1
sel : Set α → Option α
h_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s
s : Set α
n : ℕ
a : α
h : sel s = none
⊢ enumerate sel s (n + 1) = some a → a ∈ s
state_after: no goals

tactic: simp only [enumerate, h, Nat.add_eq, add_zero]
state_before: case some
α : Type u_1
sel : Set α → Option α
h_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s
s : Set α
n : ℕ
a a' : α
h : sel s = some a'
⊢ enumerate sel s (n + 1) = some a → a ∈ s
state_after: case some
α : Type u_1
sel : Set α → Option α
h_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s
s : Set α
n : ℕ
a a' : α
h : sel s = some a'
⊢ (do
        let a ← some a'
        enumerate sel (s \ {a}) n) =
      some a →
    a ∈ s

tactic: exact fun h' : enumerate sel (s \ {a'}) n = some a ↦
  have : a ∈ s \ {a'} := enumerate_mem h_sel h'
  this.left
state_before: case some
α : Type u_1
sel : Set α → Option α
h_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s
s : Set α
n : ℕ
a a' : α
h : sel s = some a'
⊢ (do
        let a ← some a'
        enumerate sel (s \ {a}) n) =
      some a →
    a ∈ s
state_after: no goals
Theorem: IsAdjoinRootMonic.coeff_apply
File: Mathlib/RingTheory/IsAdjoinRoot.lean

tactic: split_ifs with hi
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : Ring S
f : R[X]
inst✝ : Algebra R S
h : IsAdjoinRootMonic S f
z : S
i : ℕ
⊢ h.coeff z i = if hi : i < f.natDegree then (h.basis.repr z) ⟨i, hi⟩ else 0
state_after: case pos
R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : Ring S
f : R[X]
inst✝ : Algebra R S
h : IsAdjoinRootMonic S f
z : S
i : ℕ
hi : i < f.natDegree
⊢ h.coeff z i = (h.basis.repr z) ⟨i, hi⟩

case neg
R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : Ring S
f : R[X]
inst✝ : Algebra R S
h : IsAdjoinRootMonic S f
z : S
i : ℕ
hi : ¬i < f.natDegree
⊢ h.coeff z i = 0

tactic: exact h.coeff_apply_lt z i hi
state_before: case pos
R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : Ring S
f : R[X]
inst✝ : Algebra R S
h : IsAdjoinRootMonic S f
z : S
i : ℕ
hi : i < f.natDegree
⊢ h.coeff z i = (h.basis.repr z) ⟨i, hi⟩
state_after: no goals

tactic: exact h.coeff_apply_le z i (le_of_not_lt hi)
state_before: case neg
R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : Ring S
f : R[X]
inst✝ : Algebra R S
h : IsAdjoinRootMonic S f
z : S
i : ℕ
hi : ¬i < f.natDegree
⊢ h.coeff z i = 0
state_after: no goals
Theorem: CoxeterSystem.isReflection_simple
File: Mathlib/GroupTheory/Coxeter/Inversion.lean

tactic: use 1, i
state_before: B : Type u_1
W : Type u_2
inst✝ : Group W
M : CoxeterMatrix B
cs : CoxeterSystem M W
i : B
⊢ cs.IsReflection (cs.simple i)
state_after: case h
B : Type u_1
W : Type u_2
inst✝ : Group W
M : CoxeterMatrix B
cs : CoxeterSystem M W
i : B
⊢ cs.simple i = 1 * cs.simple i * 1⁻¹

tactic: simp
state_before: case h
B : Type u_1
W : Type u_2
inst✝ : Group W
M : CoxeterMatrix B
cs : CoxeterSystem M W
i : B
⊢ cs.simple i = 1 * cs.simple i * 1⁻¹
state_after: no goals
Theorem: Ultrafilter.tendsto_pure_self
File: Mathlib/Topology/StoneCech.lean

tactic: rw [Tendsto, ← coe_map, ultrafilter_converges_iff]
state_before: α : Type u
b : Ultrafilter α
⊢ Tendsto pure (↑b) (𝓝 b)
state_after: α : Type u
b : Ultrafilter α
⊢ b = joinM (map pure b)

tactic: ext s
state_before: α : Type u
b : Ultrafilter α
⊢ b = joinM (map pure b)
state_after: case h
α : Type u
b : Ultrafilter α
s : Set α
⊢ s ∈ b ↔ s ∈ joinM (map pure b)

tactic: change s ∈ b ↔ {t | s ∈ t} ∈ map pure b
state_before: case h
α : Type u
b : Ultrafilter α
s : Set α
⊢ s ∈ b ↔ s ∈ joinM (map pure b)
state_after: case h
α : Type u
b : Ultrafilter α
s : Set α
⊢ s ∈ b ↔ {t | s ∈ t} ∈ map pure b

tactic: simp_rw [mem_map, preimage_setOf_eq, mem_pure, setOf_mem_eq]
state_before: case h
α : Type u
b : Ultrafilter α
s : Set α
⊢ s ∈ b ↔ {t | s ∈ t} ∈ map pure b
state_after: no goals
Theorem: succ_ne_self
File: Mathlib/Algebra/Ring/Basic.lean

tactic: simp [h]
state_before: R : Type u_1
α : Type u_2
inst✝¹ : NonAssocRing α
inst✝ : Nontrivial α
a : α
h : a + 1 = a
⊢ a + 1 = a + 0
state_after: no goals