tasksource/leandojo huggingface dataset:
Theorem: EMetric.hausdorffEdist_le_ediam
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: rcases hs with ⟨x, xs⟩
state_before: ι : Sort ?u.46050
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
hs : Set.Nonempty s
ht : Set.Nonempty t
⊢ hausdorffEdist s t ≤ diam (s ∪ t)

tactic: rcases ht with ⟨y, yt⟩
state_before: case intro
ι : Sort ?u.46050
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x✝ y : α
s t u : Set α
Φ : α → β
ht : Set.Nonempty t
x : α
xs : x ∈ s
⊢ hausdorffEdist s t ≤ diam (s ∪ t)

tactic: refine' hausdorffEdist_le_of_mem_edist _ _
state_before: case intro.intro
ι : Sort ?u.46050
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x✝ y✝ : α
s t u : Set α
Φ : α → β
x : α
xs : x ∈ s
y : α
yt : y ∈ t
⊢ hausdorffEdist s t ≤ diam (s ∪ t)

tactic: intro z hz
state_before: case intro.intro.refine'_1
ι : Sort ?u.46050
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x✝ y✝ : α
s t u : Set α
Φ : α → β
x : α
xs : x ∈ s
y : α
yt : y ∈ t
⊢ ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ edist x y ≤ diam (s ∪ t)

tactic: exact ⟨y, yt, edist_le_diam_of_mem (subset_union_left _ _ hz) (subset_union_right _ _ yt)⟩
state_before: case intro.intro.refine'_1
ι : Sort ?u.46050
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x✝ y✝ : α
s t u : Set α
Φ : α → β
x : α
xs : x ∈ s
y : α
yt : y ∈ t
z : α
hz : z ∈ s
⊢ ∃ y, y ∈ t ∧ edist z y ≤ diam (s ∪ t)

tactic: intro z hz
state_before: case intro.intro.refine'_2
ι : Sort ?u.46050
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x✝ y✝ : α
s t u : Set α
Φ : α → β
x : α
xs : x ∈ s
y : α
yt : y ∈ t
⊢ ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ edist x y ≤ diam (s ∪ t)

tactic: exact ⟨x, xs, edist_le_diam_of_mem (subset_union_right _ _ hz) (subset_union_left _ _ xs)⟩
state_before: case intro.intro.refine'_2
ι : Sort ?u.46050
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x✝ y✝ : α
s t u : Set α
Φ : α → β
x : α
xs : x ∈ s
y : α
yt : y ∈ t
z : α
hz : z ∈ t
⊢ ∃ y, y ∈ s ∧ edist z y ≤ diam (s ∪ t)
Theorem: StrictMono.maximal_preimage_top
File: Mathlib/Order/BoundedOrder.lean

tactic: rw [h_top]
state_before: α : Type u
β : Type v
γ : Type ?u.17940
δ : Type ?u.17943
inst✝² : LinearOrder α
inst✝¹ : Preorder β
inst✝ : OrderTop β
f : α → β
H : StrictMono f
a : α
h_top : f a = ⊤
x : α
p : β
⊢ p ≤ f a

tactic: exact le_top
state_before: α : Type u
β : Type v
γ : Type ?u.17940
δ : Type ?u.17943
inst✝² : LinearOrder α
inst✝¹ : Preorder β
inst✝ : OrderTop β
f : α → β
H : StrictMono f
a : α
h_top : f a = ⊤
x : α
p : β
⊢ p ≤ ⊤
Theorem: Filter.sInter_comap_sets
File: Mathlib/Order/Filter/Basic.lean

tactic: ext x
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.278063
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m : α → β
m' : β → γ
s : Set α
t : Set β
f : α → β
F : Filter β
⊢ ⋂₀ (comap f F).sets = ⋂ (U : Set β) (_ : U ∈ F), f ⁻¹' U

tactic: suffices (∀ (A : Set α) (B : Set β), B ∈ F → f ⁻¹' B ⊆ A → x ∈ A) ↔
    ∀ B : Set β, B ∈ F → f x ∈ B by
  simp only [mem_sInter, mem_iInter, Filter.mem_sets, mem_comap, this, and_imp, exists_prop,
    mem_preimage, exists_imp]
state_before: case h
α : Type u
β : Type v
γ : Type w
δ : Type ?u.278063
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m : α → β
m' : β → γ
s : Set α
t : Set β
f : α → β
F : Filter β
x : α
⊢ x ∈ ⋂₀ (comap f F).sets ↔ x ∈ ⋂ (U : Set β) (_ : U ∈ F), f ⁻¹' U

tactic: constructor
state_before: case h
α : Type u
β : Type v
γ : Type w
δ : Type ?u.278063
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m : α → β
m' : β → γ
s : Set α
t : Set β
f : α → β
F : Filter β
x : α
⊢ (∀ (A : Set α) (B : Set β), B ∈ F → f ⁻¹' B ⊆ A → x ∈ A) ↔ ∀ (B : Set β), B ∈ F → f x ∈ B

tactic: simp only [mem_sInter, mem_iInter, Filter.mem_sets, mem_comap, this, and_imp, exists_prop,
  mem_preimage, exists_imp]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.278063
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m : α → β
m' : β → γ
s : Set α
t : Set β
f : α → β
F : Filter β
x : α
this : (∀ (A : Set α) (B : Set β), B ∈ F → f ⁻¹' B ⊆ A → x ∈ A) ↔ ∀ (B : Set β), B ∈ F → f x ∈ B
⊢ x ∈ ⋂₀ (comap f F).sets ↔ x ∈ ⋂ (U : Set β) (_ : U ∈ F), f ⁻¹' U

tactic: intro h U U_in
state_before: case h.mp
α : Type u
β : Type v
γ : Type w
δ : Type ?u.278063
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m : α → β
m' : β → γ
s : Set α
t : Set β
f : α → β
F : Filter β
x : α
⊢ (∀ (A : Set α) (B : Set β), B ∈ F → f ⁻¹' B ⊆ A → x ∈ A) → ∀ (B : Set β), B ∈ F → f x ∈ B

tactic: simpa only [Subset.rfl, forall_prop_of_true, mem_preimage] using h (f ⁻¹' U) U U_in
state_before: case h.mp
α : Type u
β : Type v
γ : Type w
δ : Type ?u.278063
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m : α → β
m' : β → γ
s : Set α
t : Set β
f : α → β
F : Filter β
x : α
h : ∀ (A : Set α) (B : Set β), B ∈ F → f ⁻¹' B ⊆ A → x ∈ A
U : Set β
U_in : U ∈ F
⊢ f x ∈ U

tactic: intro h V U U_in f_U_V
state_before: case h.mpr
α : Type u
β : Type v
γ : Type w
δ : Type ?u.278063
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m : α → β
m' : β → γ
s : Set α
t : Set β
f : α → β
F : Filter β
x : α
⊢ (∀ (B : Set β), B ∈ F → f x ∈ B) → ∀ (A : Set α) (B : Set β), B ∈ F → f ⁻¹' B ⊆ A → x ∈ A

tactic: exact f_U_V (h U U_in)
state_before: case h.mpr
α : Type u
β : Type v
γ : Type w
δ : Type ?u.278063
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m : α → β
m' : β → γ
s : Set α
t : Set β
f : α → β
F : Filter β
x : α
h : ∀ (B : Set β), B ∈ F → f x ∈ B
V : Set α
U : Set β
U_in : U ∈ F
f_U_V : f ⁻¹' U ⊆ V
⊢ x ∈ V
Theorem: Partrec.option_some_iff
File: Mathlib/Computability/Partrec.lean

tactic: simp [Part.bind_assoc, ← Function.comp_apply (f := Part.some) (g := encode), bind_some_eq_map,
  -Function.comp_apply]
state_before: α : Type u_1
β : Type ?u.211200
γ : Type ?u.211203
σ : Type u_2
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α →. σ
h : Partrec fun a => Part.map Option.some (f a)
n : ℕ
⊢ (do
      let n ← Part.bind ↑(decode n) fun a => Part.map encode ((fun a => Part.map Option.some (f a)) a)
      ↑(Nat.ppred n)) =
    Part.bind ↑(decode n) fun a => Part.map encode (f a)
Theorem: SimplexCategory.δ_comp_σ_self'
File: Mathlib/AlgebraicTopology/SimplexCategory.lean

tactic: subst H
state_before: n : ℕ
j : Fin (n + 2)
i : Fin (n + 1)
H : j = ↑Fin.castSucc i
⊢ δ j ≫ σ i = 𝟙 [n]

tactic: rw [δ_comp_σ_self]
state_before: n : ℕ
i : Fin (n + 1)
⊢ δ (↑Fin.castSucc i) ≫ σ i = 𝟙 [n]
Theorem: Int.sub_self
File: Std/Data/Int/Lemmas.lean

tactic: rw [Int.sub_eq_add_neg, Int.add_right_neg]
state_before: a : Int
⊢ a - a = 0
Theorem: idealFactorsFunOfQuotHom_comp
File: Mathlib/RingTheory/DedekindDomain/Ideal.lean

tactic: refine OrderHom.ext _ _ (funext fun x => ?_)
state_before: R : Type u_1
A : Type u_2
K : Type ?u.981852
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : Field K
inst✝⁴ : IsDomain A
inst✝³ : IsDedekindDomain A
I : Ideal R
J : Ideal A
B : Type u_3
inst✝² : CommRing B
inst✝¹ : IsDomain B
inst✝ : IsDedekindDomain B
L : Ideal B
f : R ⧸ I →+* A ⧸ J
g : A ⧸ J →+* B ⧸ L
hf : Function.Surjective ↑f
hg : Function.Surjective ↑g
⊢ OrderHom.comp (idealFactorsFunOfQuotHom hg) (idealFactorsFunOfQuotHom hf) =
    idealFactorsFunOfQuotHom (_ : Function.Surjective ↑(RingHom.comp g f))

tactic: rw [idealFactorsFunOfQuotHom, idealFactorsFunOfQuotHom, OrderHom.comp_coe, OrderHom.coe_fun_mk,
  OrderHom.coe_fun_mk, Function.comp_apply, idealFactorsFunOfQuotHom, OrderHom.coe_fun_mk,
  Subtype.mk_eq_mk, Subtype.coe_mk, map_comap_of_surjective (Ideal.Quotient.mk J)
  Quotient.mk_surjective, map_map]
state_before: R : Type u_1
A : Type u_2
K : Type ?u.981852
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : Field K
inst✝⁴ : IsDomain A
inst✝³ : IsDedekindDomain A
I : Ideal R
J : Ideal A
B : Type u_3
inst✝² : CommRing B
inst✝¹ : IsDomain B
inst✝ : IsDedekindDomain B
L : Ideal B
f : R ⧸ I →+* A ⧸ J
g : A ⧸ J →+* B ⧸ L
hf : Function.Surjective ↑f
hg : Function.Surjective ↑g
x : ↑{p | p ∣ I}
⊢ ↑(OrderHom.comp (idealFactorsFunOfQuotHom hg) (idealFactorsFunOfQuotHom hf)) x =
    ↑(idealFactorsFunOfQuotHom (_ : Function.Surjective ↑(RingHom.comp g f))) x
Theorem: List.length_concat'
File: Mathlib/Data/List/Basic.lean

tactic: simp only [concat_eq_append, length_append, length]
state_before: ι : Type ?u.25204
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a : α
l : List α
⊢ length (concat l a) = succ (length l)
Theorem: UniqueFactorizationMonoid.normalizedFactors_zero
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: simp [normalizedFactors, factors]
state_before: α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
⊢ normalizedFactors 0 = 0
Theorem: PartENat.lt_find
File: Mathlib/Data/Nat/PartENat.lean

tactic: rw [coe_lt_iff]
state_before: P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ∀ (m : ℕ), m ≤ n → ¬P m
⊢ ↑n < find P

tactic: intro h₁
state_before: P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ∀ (m : ℕ), m ≤ n → ¬P m
⊢ ∀ (h : (find P).Dom), n < Part.get (find P) h

tactic: rw [find_get]
state_before: P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ∀ (m : ℕ), m ≤ n → ¬P m
h₁ : (find P).Dom
⊢ n < Part.get (find P) h₁

tactic: have h₂ := @Nat.find_spec P _ h₁
state_before: P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ∀ (m : ℕ), m ≤ n → ¬P m
h₁ : (find P).Dom
⊢ n < Nat.find h₁

tactic: revert h₂
state_before: P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ∀ (m : ℕ), m ≤ n → ¬P m
h₁ : (find P).Dom
h₂ : P (Nat.find h₁)
⊢ n < Nat.find h₁

tactic: contrapose
state_before: P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ∀ (m : ℕ), m ≤ n → ¬P m
h₁ : (find P).Dom
⊢ P (Nat.find h₁) → n < Nat.find h₁

tactic: intro h₂
state_before: P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ∀ (m : ℕ), m ≤ n → ¬P m
h₁ : (find P).Dom
⊢ ¬n < Nat.find h₁ → ¬P (Nat.find h₁)

tactic: rw [not_lt] at h₂
state_before: P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ∀ (m : ℕ), m ≤ n → ¬P m
h₁ : (find P).Dom
h₂ : ¬n < Nat.find h₁
⊢ ¬P (Nat.find h₁)

tactic: exact h _ h₂
state_before: P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ∀ (m : ℕ), m ≤ n → ¬P m
h₁ : (find P).Dom
h₂ : Nat.find h₁ ≤ n
⊢ ¬P (Nat.find h₁)
Theorem: RingHom.sub_mem_ker_iff
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: rw [mem_ker, map_sub, sub_eq_zero]
state_before: R : Type u
S : Type v
T : Type w
F : Type u_1
inst✝¹ : Ring R
inst✝ : Ring S
rc : RingHomClass F R S
f : F
x y : R
⊢ x - y ∈ ker f ↔ ↑f x = ↑f y
Theorem: CategoryTheory.Limits.kernelSubobject_comp_mono
File: Mathlib/CategoryTheory/Subobject/Limits.lean

tactic: simp
state_before: C : Type u
inst✝⁴ : Category C
X Y Z✝ : C
inst✝³ : HasZeroMorphisms C
f✝ : X ⟶ Y
inst✝² : HasKernel f✝
f : X ⟶ Y
inst✝¹ : HasKernel f
Z : C
h : Y ⟶ Z
inst✝ : Mono h
⊢ (arrow (kernelSubobject (f ≫ h)) ≫ f) ≫ h = 0 ≫ h
Theorem: ENNReal.toNNReal_le_toNNReal
File: Mathlib/Data/Real/ENNReal.lean

tactic: rwa [← coe_toNNReal ha, ← coe_toNNReal hb, coe_le_coe]
state_before: α : Type ?u.799347
β : Type ?u.799350
a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ ⊤
hb : b ≠ ⊤
h : ENNReal.toNNReal a ≤ ENNReal.toNNReal b
⊢ a ≤ b
Theorem: Polynomial.dvd_iterate_derivative_pow
File: Mathlib/Data/Polynomial/Derivative.lean

tactic: obtain ⟨m, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hm
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : CommSemiring R
f : R[X]
n m : ℕ
c : R
hm : m ≠ 0
⊢ ↑n ∣ eval c ((↑derivative^[m]) (f ^ n))

tactic: rw [Function.iterate_succ_apply, derivative_pow, mul_assoc, C_eq_nat_cast,
  iterate_derivative_nat_cast_mul, eval_mul, eval_nat_cast]
state_before: case intro
R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : CommSemiring R
f : R[X]
n : ℕ
c : R
m : ℕ
hm : Nat.succ m ≠ 0
⊢ ↑n ∣ eval c ((↑derivative^[Nat.succ m]) (f ^ n))

tactic: exact dvd_mul_right _ _
state_before: case intro
R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : CommSemiring R
f : R[X]
n : ℕ
c : R
m : ℕ
hm : Nat.succ m ≠ 0
⊢ ↑n ∣ ↑n * eval c ((↑derivative^[m]) (f ^ (n - 1) * ↑derivative f))
Theorem: Fin.succAbove_pos
File: Mathlib/Data/Fin/Basic.lean

tactic: by_cases H : castSucc i < p
state_before: n m : ℕ
inst✝ : NeZero n
p : Fin (n + 1)
i : Fin n
h : 0 < i
⊢ 0 < ↑(succAbove p) i

tactic: simpa [succAbove_below _ _ H] using castSucc_pos h
state_before: case pos
n m : ℕ
inst✝ : NeZero n
p : Fin (n + 1)
i : Fin n
h : 0 < i
H : ↑castSucc i < p
⊢ 0 < ↑(succAbove p) i

tactic: simp [succAbove_above _ _ (le_of_not_lt H)]
state_before: case neg
n m : ℕ
inst✝ : NeZero n
p : Fin (n + 1)
i : Fin n
h : 0 < i
H : ¬↑castSucc i < p
⊢ 0 < ↑(succAbove p) i
Theorem: Localization.mk_nat_cast
File: Mathlib/RingTheory/Localization/Basic.lean

tactic: simpa using @mk_algebraMap R _ M ℕ _ _ m
state_before: R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type ?u.2909039
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
P : Type ?u.2909206
inst✝ : CommSemiring P
m : ℕ
⊢ mk (↑m) 1 = ↑m
Theorem: MeasureTheory.ProbabilityMeasure.limsup_measure_closed_le_of_tendsto
File: Mathlib/MeasureTheory/Measure/Portmanteau.lean

tactic: apply FiniteMeasure.limsup_measure_closed_le_of_tendsto
  ((ProbabilityMeasure.tendsto_nhds_iff_toFiniteMeasure_tendsto_nhds L).mp μs_lim) F_closed
state_before: Ω✝ : Type ?u.34617
inst✝³ : MeasurableSpace Ω✝
Ω : Type u_1
ι : Type u_2
L : Filter ι
inst✝² : MeasurableSpace Ω
inst✝¹ : PseudoEMetricSpace Ω
inst✝ : OpensMeasurableSpace Ω
μ : ProbabilityMeasure Ω
μs : ι → ProbabilityMeasure Ω
μs_lim : Tendsto μs L (𝓝 μ)
F : Set Ω
F_closed : IsClosed F
⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F
Theorem: HasDerivWithinAt.log
File: Mathlib/Analysis/SpecialFunctions/Log/Deriv.lean

tactic: rw [div_eq_inv_mul]
state_before: f : ℝ → ℝ
x f' : ℝ
s : Set ℝ
hf : HasDerivWithinAt f f' s x
hx : f x ≠ 0
⊢ HasDerivWithinAt (fun y => Real.log (f y)) (f' / f x) s x

tactic: exact (hasDerivAt_log hx).comp_hasDerivWithinAt x hf
state_before: f : ℝ → ℝ
x f' : ℝ
s : Set ℝ
hf : HasDerivWithinAt f f' s x
hx : f x ≠ 0
⊢ HasDerivWithinAt (fun y => Real.log (f y)) ((f x)⁻¹ * f') s x
Theorem: MeasureTheory.inter_ae_eq_left_of_ae_eq_univ
File: Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean

tactic: convert ae_eq_set_inter (ae_eq_refl s) h
state_before: α : Type u_1
β : Type ?u.125038
γ : Type ?u.125041
δ : Type ?u.125044
ι : Type ?u.125047
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
h : t =ᵐ[μ] univ
⊢ s ∩ t =ᵐ[μ] s

tactic: rw [inter_univ]
state_before: case h.e'_5
α : Type u_1
β : Type ?u.125038
γ : Type ?u.125041
δ : Type ?u.125044
ι : Type ?u.125047
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
h : t =ᵐ[μ] univ
⊢ s = s ∩ univ
Theorem: SimplexCategory.δ_comp_σ_of_gt'
File: Mathlib/AlgebraicTopology/SimplexCategory.lean

tactic: simp only [Fin.not_lt_zero, hi] at H
state_before: n : ℕ
i : Fin (n + 3)
j : Fin (n + 2)
H : Fin.succ j < i
hi : i = 0
⊢ False

tactic: rw [← δ_comp_σ_of_gt]
state_before: n : ℕ
i : Fin (n + 3)
j : Fin (n + 2)
H : Fin.succ j < i
⊢ δ i ≫ σ j = σ (Fin.castLT j (_ : ↑j < n + 1)) ≫ δ (Fin.pred i (_ : i = 0 → False))

tactic: simp
state_before: n : ℕ
i : Fin (n + 3)
j : Fin (n + 2)
H : Fin.succ j < i
⊢ δ i ≫ σ j = δ (Fin.succ (Fin.pred i (_ : i = 0 → False))) ≫ σ (↑Fin.castSucc (Fin.castLT j (_ : ↑j < n + 1)))

tactic: rw [Fin.castSucc_castLT, ← Fin.succ_lt_succ_iff, Fin.succ_pred]
state_before: n : ℕ
i : Fin (n + 3)
j : Fin (n + 2)
H : Fin.succ j < i
⊢ ↑Fin.castSucc (Fin.castLT j (_ : ↑j < n + 1)) < Fin.pred i (_ : i = 0 → False)

tactic: exact H
state_before: n : ℕ
i : Fin (n + 3)
j : Fin (n + 2)
H : Fin.succ j < i
⊢ Fin.succ j < i
Theorem: ZMod.pow_card_sub_one_eq_one
File: Mathlib/FieldTheory/Finite/Basic.lean

tactic: have h := FiniteField.pow_card_sub_one_eq_one a ha
state_before: K : Type ?u.1085344
R : Type ?u.1085347
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
⊢ a ^ (p - 1) = 1

tactic: rwa [ZMod.card p] at h
state_before: K : Type ?u.1085344
R : Type ?u.1085347
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ZMod p
ha : a ≠ 0
h : a ^ (Fintype.card (ZMod p) - 1) = 1
⊢ a ^ (p - 1) = 1
Theorem: Set.star_add
File: Mathlib/Algebra/Star/Pointwise.lean

tactic: simp_rw [← image_star, ← image2_add, image_image2, image2_image_left, image2_image_right,
  star_add]
state_before: α : Type u_1
s✝ t✝ : Set α
a : α
inst✝¹ : AddMonoid α
inst✝ : StarAddMonoid α
s t : Set α
⊢ (s + t)⋆ = s⋆ + t⋆
Theorem: BoxIntegral.TaggedPrepartition.IsHenstock.card_filter_tag_eq_le
File: Mathlib/Analysis/BoxIntegral/Partition/Tagged.lean

tactic: refine' Finset.card_le_of_subset fun J hJ => _
state_before: ι : Type u_1
I J : Box ι
π π₁ π₂ : TaggedPrepartition I
x✝ : ι → ℝ
inst✝ : Fintype ι
h : IsHenstock π
x : ι → ℝ
⊢ Finset.card (Finset.filter (fun J => tag π J = x) π.boxes) ≤
    Finset.card (Finset.filter (fun J => x ∈ ↑Box.Icc J) π.boxes)

tactic: rw [Finset.mem_filter] at hJ⊢
state_before: ι : Type u_1
I J✝ : Box ι
π π₁ π₂ : TaggedPrepartition I
x✝ : ι → ℝ
inst✝ : Fintype ι
h : IsHenstock π
x : ι → ℝ
J : Box ι
hJ : J ∈ Finset.filter (fun J => tag π J = x) π.boxes
⊢ J ∈ Finset.filter (fun J => x ∈ ↑Box.Icc J) π.boxes

tactic: rcases hJ with ⟨hJ, rfl⟩
state_before: ι : Type u_1
I J✝ : Box ι
π π₁ π₂ : TaggedPrepartition I
x✝ : ι → ℝ
inst✝ : Fintype ι
h : IsHenstock π
x : ι → ℝ
J : Box ι
hJ : J ∈ π.boxes ∧ tag π J = x
⊢ J ∈ π.boxes ∧ x ∈ ↑Box.Icc J

tactic: exact ⟨hJ, h J hJ⟩
state_before: case intro
ι : Type u_1
I J✝ : Box ι
π π₁ π₂ : TaggedPrepartition I
x : ι → ℝ
inst✝ : Fintype ι
h : IsHenstock π
J : Box ι
hJ : J ∈ π.boxes
⊢ J ∈ π.boxes ∧ tag π J ∈ ↑Box.Icc J
Theorem: toIcoMod_mem_Ico'
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: convert toIcoMod_mem_Ico hp 0 b
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b✝ c : α
n : ℤ
b : α
⊢ toIcoMod hp 0 b ∈ Set.Ico 0 p

tactic: exact (zero_add p).symm
state_before: case h.e'_5.h.e'_4
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b✝ c : α
n : ℤ
b : α
⊢ p = 0 + p
Theorem: Metric.hausdorffDist_le_of_mem_dist
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: apply hausdorffDist_le_of_infDist hr
state_before: ι : Sort ?u.77239
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
r : ℝ
hr : 0 ≤ r
H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ r
H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ r
⊢ hausdorffDist s t ≤ r

tactic: intro x xs
state_before: case H1
ι : Sort ?u.77239
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
r : ℝ
hr : 0 ≤ r
H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ r
H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ r
⊢ ∀ (x : α), x ∈ s → infDist x t ≤ r

tactic: rcases H1 x xs with ⟨y, yt, hy⟩
state_before: case H1
ι : Sort ?u.77239
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x✝ y : α
Φ : α → β
r : ℝ
hr : 0 ≤ r
H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ r
H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ r
x : α
xs : x ∈ s
⊢ infDist x t ≤ r

tactic: exact le_trans (infDist_le_dist_of_mem yt) hy
state_before: case H1.intro.intro
ι : Sort ?u.77239
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x✝ y✝ : α
Φ : α → β
r : ℝ
hr : 0 ≤ r
H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ r
H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ r
x : α
xs : x ∈ s
y : α
yt : y ∈ t
hy : dist x y ≤ r
⊢ infDist x t ≤ r

tactic: intro x xt
state_before: case H2
ι : Sort ?u.77239
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
r : ℝ
hr : 0 ≤ r
H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ r
H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ r
⊢ ∀ (x : α), x ∈ t → infDist x s ≤ r

tactic: rcases H2 x xt with ⟨y, ys, hy⟩
state_before: case H2
ι : Sort ?u.77239
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x✝ y : α
Φ : α → β
r : ℝ
hr : 0 ≤ r
H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ r
H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ r
x : α
xt : x ∈ t
⊢ infDist x s ≤ r

tactic: exact le_trans (infDist_le_dist_of_mem ys) hy
state_before: case H2.intro.intro
ι : Sort ?u.77239
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x✝ y✝ : α
Φ : α → β
r : ℝ
hr : 0 ≤ r
H1 : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ dist x y ≤ r
H2 : ∀ (x : α), x ∈ t → ∃ y, y ∈ s ∧ dist x y ≤ r
x : α
xt : x ∈ t
y : α
ys : y ∈ s
hy : dist x y ≤ r
⊢ infDist x s ≤ r
Theorem: HahnSeries.C_ne_zero
File: Mathlib/RingTheory/HahnSeries.lean

tactic: contrapose! h
state_before: Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonAssocSemiring R
r : R
h : r ≠ 0
⊢ ↑C r ≠ 0

tactic: rw [← C_zero] at h
state_before: Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonAssocSemiring R
r : R
h : ↑C r = 0
⊢ r = 0

tactic: exact C_injective h
state_before: Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonAssocSemiring R
r : R
h : ↑C r = ↑C 0
⊢ r = 0
Theorem: LinearMap.range_mkQ_comp
File: Mathlib/LinearAlgebra/Quotient.lean

tactic: simp
state_before: R : Type u_1
M : Type u_3
R₂ : Type u_2
M₂ : Type u_4
R₃ : Type ?u.414158
M₃ : Type ?u.414161
inst✝¹⁰ : Ring R
inst✝⁹ : Ring R₂
inst✝⁸ : Ring R₃
inst✝⁷ : AddCommMonoid M
inst✝⁶ : AddCommGroup M₂
inst✝⁵ : AddCommMonoid M₃
inst✝⁴ : Module R M
inst✝³ : Module R₂ M₂
inst✝² : Module R₃ M₃
τ₁₂ : R →+* R₂
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
inst✝ : RingHomSurjective τ₁₂
f : M →ₛₗ[τ₁₂] M₂
x : M
⊢ ↑(comp (mkQ (range f)) f) x = ↑0 x
Theorem: List.map₂Right'_nil_left
File: Mathlib/Data/List/Basic.lean

tactic: cases bs <;> rfl
state_before: ι : Type ?u.462841
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : Option α → β → γ
a : α
as : List α
b : β
bs : List β
⊢ map₂Right' f [] bs = (map (f none) bs, [])
Theorem: Equiv.Perm.Disjoint.mul_left
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: cases H1 x <;> cases H2 x <;> simp [*]
state_before: α : Type u_1
f g h : Perm α
H1 : Disjoint f h
H2 : Disjoint g h
x : α
⊢ ↑(f * g) x = x ∨ ↑h x = x
Theorem: Nat.bit0_inj
File: Mathlib/Init/Data/Nat/Lemmas.lean

tactic: contradiction
state_before: m : ℕ
h : bit0 0 = bit0 (m + 1)
⊢ 0 = m + 1

tactic: contradiction
state_before: n : ℕ
h : bit0 (n + 1) = bit0 0
⊢ n + 1 = 0

tactic: have h : succ (succ (n + n)) = succ (succ (m + m)) := by
  unfold bit0 at h
  simp [add_one, add_succ, succ_add] at h
  have aux : n + n = m + m := h
  rw [aux]
state_before: n m : ℕ
h : bit0 (n + 1) = bit0 (m + 1)
⊢ n + 1 = m + 1

tactic: have : n + n = m + m := by repeat
  injection h with h
state_before: n m : ℕ
h✝ : bit0 (n + 1) = bit0 (m + 1)
h : succ (succ (n + n)) = succ (succ (m + m))
⊢ n + 1 = m + 1

tactic: have : n = m := Nat.bit0_inj this
state_before: n m : ℕ
h✝ : bit0 (n + 1) = bit0 (m + 1)
h : succ (succ (n + n)) = succ (succ (m + m))
this : n + n = m + m
⊢ n + 1 = m + 1

tactic: rw [this]
state_before: n m : ℕ
h✝ : bit0 (n + 1) = bit0 (m + 1)
h : succ (succ (n + n)) = succ (succ (m + m))
this✝ : n + n = m + m
this : n = m
⊢ n + 1 = m + 1

tactic: unfold bit0 at h
state_before: n m : ℕ
h : bit0 (n + 1) = bit0 (m + 1)
⊢ succ (succ (n + n)) = succ (succ (m + m))

tactic: simp [add_one, add_succ, succ_add] at h
state_before: n m : ℕ
h : n + 1 + (n + 1) = m + 1 + (m + 1)
⊢ succ (succ (n + n)) = succ (succ (m + m))

tactic: have aux : n + n = m + m := h
state_before: n m : ℕ
h : n + n = m + m
⊢ succ (succ (n + n)) = succ (succ (m + m))

tactic: rw [aux]
state_before: n m : ℕ
h aux : n + n = m + m
⊢ succ (succ (n + n)) = succ (succ (m + m))

tactic: repeat
injection h with h
state_before: n m : ℕ
h✝ : bit0 (n + 1) = bit0 (m + 1)
h : succ (succ (n + n)) = succ (succ (m + m))
⊢ n + n = m + m