tasksource/leandojo huggingface dataset:
Theorem: zpow_add
File: Mathlib/Algebra/GroupPower/Lemmas.lean

tactic: induction' n using Int.induction_on with n ihn n ihn
state_before: α : Type ?u.121447
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : Group G
a : G
m n : ℤ
⊢ a ^ (m + n) = a ^ m * a ^ n

tactic: case hz => simp
state_before: case hz
α : Type ?u.121447
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : Group G
a : G
m : ℤ
⊢ a ^ (m + 0) = a ^ m * a ^ 0

case hp
α : Type ?u.121447
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : Group G
a : G
m : ℤ
n : ℕ
ihn : a ^ (m + ↑n) = a ^ m * a ^ ↑n
⊢ a ^ (m + (↑n + 1)) = a ^ m * a ^ (↑n + 1)

case hn
α : Type ?u.121447
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : Group G
a : G
m : ℤ
n : ℕ
ihn : a ^ (m + -↑n) = a ^ m * a ^ (-↑n)
⊢ a ^ (m + (-↑n - 1)) = a ^ m * a ^ (-↑n - 1)

tactic: simp
state_before: α : Type ?u.121447
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : Group G
a : G
m : ℤ
⊢ a ^ (m + 0) = a ^ m * a ^ 0

tactic: simp only [← add_assoc, zpow_add_one, ihn, mul_assoc]
state_before: case hp
α : Type ?u.121447
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : Group G
a : G
m : ℤ
n : ℕ
ihn : a ^ (m + ↑n) = a ^ m * a ^ ↑n
⊢ a ^ (m + (↑n + 1)) = a ^ m * a ^ (↑n + 1)

tactic: rw [zpow_sub_one, ← mul_assoc, ← ihn, ← zpow_sub_one, add_sub_assoc]
state_before: case hn
α : Type ?u.121447
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : Group G
a : G
m : ℤ
n : ℕ
ihn : a ^ (m + -↑n) = a ^ m * a ^ (-↑n)
⊢ a ^ (m + (-↑n - 1)) = a ^ m * a ^ (-↑n - 1)
Theorem: toIocDiv_sub_eq_toIocDiv_add'
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: rw [← sub_neg_eq_add, toIocDiv_sub_eq_toIocDiv_add, sub_eq_add_neg]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c✝ : α
n : ℤ
a b c : α
⊢ toIocDiv hp (a - c) b = toIocDiv hp a (b + c)
Theorem: Basis.card_le_card_of_linearIndependent
File: Mathlib/LinearAlgebra/Dimension.lean

tactic: letI := nontrivial_of_invariantBasisNumber R
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι✝ : Type w
ι'✝ : Type w'
η : Type u₁'
φ : η → Type ?u.399284
R : Type u
inst✝⁵ : Ring R
inst✝⁴ : StrongRankCondition R
M : Type v
inst✝³ : AddCommGroup M
inst✝² : Module R M
ι : Type u_1
inst✝¹ : Fintype ι
b : Basis ι R M
ι' : Type u_2
inst✝ : Fintype ι'
v : ι' → M
hv : LinearIndependent R v
⊢ Fintype.card ι' ≤ Fintype.card ι

tactic: simpa [rank_eq_card_basis b, Cardinal.mk_fintype] using
  cardinal_lift_le_rank_of_linearIndependent' hv
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι✝ : Type w
ι'✝ : Type w'
η : Type u₁'
φ : η → Type ?u.399284
R : Type u
inst✝⁵ : Ring R
inst✝⁴ : StrongRankCondition R
M : Type v
inst✝³ : AddCommGroup M
inst✝² : Module R M
ι : Type u_1
inst✝¹ : Fintype ι
b : Basis ι R M
ι' : Type u_2
inst✝ : Fintype ι'
v : ι' → M
hv : LinearIndependent R v
this : Nontrivial R := nontrivial_of_invariantBasisNumber R
⊢ Fintype.card ι' ≤ Fintype.card ι
Theorem: CauchyFilter.uniformContinuous_extend
File: Mathlib/Topology/UniformSpace/Completion.lean

tactic: by_cases hf : UniformContinuous f
state_before: α : Type u
inst✝³ : UniformSpace α
β : Type v
γ : Type w
inst✝² : UniformSpace β
inst✝¹ : UniformSpace γ
inst✝ : CompleteSpace β
f : α → β
⊢ UniformContinuous (extend f)

tactic: rw [extend, if_pos hf]
state_before: case pos
α : Type u
inst✝³ : UniformSpace α
β : Type v
γ : Type w
inst✝² : UniformSpace β
inst✝¹ : UniformSpace γ
inst✝ : CompleteSpace β
f : α → β
hf : UniformContinuous f
⊢ UniformContinuous (extend f)

tactic: exact uniformContinuous_uniformly_extend uniformInducing_pureCauchy denseRange_pureCauchy hf
state_before: case pos
α : Type u
inst✝³ : UniformSpace α
β : Type v
γ : Type w
inst✝² : UniformSpace β
inst✝¹ : UniformSpace γ
inst✝ : CompleteSpace β
f : α → β
hf : UniformContinuous f
⊢ UniformContinuous (DenseInducing.extend (_ : DenseInducing pureCauchy) f)

tactic: rw [extend, if_neg hf]
state_before: case neg
α : Type u
inst✝³ : UniformSpace α
β : Type v
γ : Type w
inst✝² : UniformSpace β
inst✝¹ : UniformSpace γ
inst✝ : CompleteSpace β
f : α → β
hf : ¬UniformContinuous f
⊢ UniformContinuous (extend f)

tactic: exact uniformContinuous_of_const fun a _b => by congr
state_before: case neg
α : Type u
inst✝³ : UniformSpace α
β : Type v
γ : Type w
inst✝² : UniformSpace β
inst✝¹ : UniformSpace γ
inst✝ : CompleteSpace β
f : α → β
hf : ¬UniformContinuous f
⊢ UniformContinuous fun x => f (Nonempty.some (_ : Nonempty α))

tactic: congr
state_before: α : Type u
inst✝³ : UniformSpace α
β : Type v
γ : Type w
inst✝² : UniformSpace β
inst✝¹ : UniformSpace γ
inst✝ : CompleteSpace β
f : α → β
hf : ¬UniformContinuous f
a _b : CauchyFilter α
⊢ f (Nonempty.some (_ : Nonempty α)) = f (Nonempty.some (_ : Nonempty α))
Theorem: nsmul_one
File: Mathlib/Algebra/GroupPower/Lemmas.lean

tactic: let f : ℕ →+ A :=
{ toFun := fun n ↦ n • (1 : A),
  map_zero' := by simp [zero_nsmul],
  map_add' := by simp [add_nsmul] }
state_before: α : Type ?u.21
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : AddMonoidWithOne A
⊢ ∀ (n : ℕ), n • 1 = ↑n

tactic: refine' eq_natCast' f _
state_before: α : Type ?u.21
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : AddMonoidWithOne A
f : ℕ →+ A :=
  { toZeroHom := { toFun := fun n => n • 1, map_zero' := (_ : 0 • 1 = 0) },
    map_add' := (_ : ∀ (a a_1 : ℕ), (a + a_1) • 1 = a • 1 + a_1 • 1) }
⊢ ∀ (n : ℕ), n • 1 = ↑n

tactic: simp
state_before: α : Type ?u.21
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : AddMonoidWithOne A
f : ℕ →+ A :=
  { toZeroHom := { toFun := fun n => n • 1, map_zero' := (_ : 0 • 1 = 0) },
    map_add' := (_ : ∀ (a a_1 : ℕ), (a + a_1) • 1 = a • 1 + a_1 • 1) }
⊢ ↑f 1 = 1

tactic: simp [zero_nsmul]
state_before: α : Type ?u.21
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : AddMonoidWithOne A
⊢ (fun n => n • 1) 0 = 0

tactic: simp [add_nsmul]
state_before: α : Type ?u.21
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : AddMonoidWithOne A
⊢ ∀ (x y : ℕ),
    ZeroHom.toFun { toFun := fun n => n • 1, map_zero' := (_ : 0 • 1 = 0) } (x + y) =
      ZeroHom.toFun { toFun := fun n => n • 1, map_zero' := (_ : 0 • 1 = 0) } x +
        ZeroHom.toFun { toFun := fun n => n • 1, map_zero' := (_ : 0 • 1 = 0) } y
Theorem: MeasurableSpace.cardinal_generateMeasurable_le_continuum
File: Mathlib/MeasureTheory/CardMeasurableSpace.lean

tactic: rw [← continuum_power_aleph0]
state_before: α : Type u
s : Set (Set α)
hs : (#↑s) ≤ 𝔠
⊢ max (#↑s) 2 ^ ℵ₀ ≤ 𝔠

tactic: exact_mod_cast power_le_power_right (max_le hs (nat_lt_continuum 2).le)
state_before: α : Type u
s : Set (Set α)
hs : (#↑s) ≤ 𝔠
⊢ max (#↑s) 2 ^ ℵ₀ ≤ 𝔠 ^ ℵ₀
Theorem: Rat.normalize_mul_left
File: Std/Data/Rat/Lemmas.lean

tactic: simp [normalize_eq, mk'.injEq, Int.natAbs_mul, Nat.gcd_mul_left,
  Nat.mul_div_mul_left _ _ (Nat.pos_of_ne_zero a0), Int.ofNat_mul,
  Int.mul_ediv_mul_of_pos _ _ (Int.ofNat_pos.2 <| Nat.pos_of_ne_zero a0)]
state_before: d : Nat
n : Int
a : Nat
d0 : d ≠ 0
a0 : a ≠ 0
⊢ normalize (↑a * n) (a * d) = normalize n d
Theorem: limsup_eq_bot
File: Mathlib/Topology/Algebra/Order/LiminfLimsup.lean

tactic: rw [limsup_congr h]
state_before: α : Type u
β : Type v
inst✝⁴ : CompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : FirstCountableTopology α
inst✝¹ : OrderTopology α
f : Filter β
inst✝ : CountableInterFilter f
u : β → α
h : u =ᶠ[f] ⊥
⊢ limsup u f = ⊥

tactic: exact limsup_const_bot
state_before: α : Type u
β : Type v
inst✝⁴ : CompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : FirstCountableTopology α
inst✝¹ : OrderTopology α
f : Filter β
inst✝ : CountableInterFilter f
u : β → α
h : u =ᶠ[f] ⊥
⊢ limsup (fun a => ⊥ a) f = ⊥
Theorem: Ordinal.lt_blsub_iff
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simpa only [not_forall, not_lt, not_le] using not_congr (@blsub_le_iff.{_, v} _ f a)
state_before: α : Type ?u.352278
β : Type ?u.352281
γ : Type ?u.352284
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
f : (b : Ordinal) → b < o → Ordinal
a : Ordinal
⊢ a < blsub o f ↔ ∃ i hi, a ≤ f i hi
Theorem: Submodule.ne_bot_iff
File: Mathlib/Algebra/Module/Submodule/Lattice.lean

tactic: simp only [ne_eq, p.eq_bot_iff, not_forall, exists_prop]
state_before: R : Type u_1
S : Type ?u.37276
M : Type u_2
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : SMul S R
inst✝ : IsScalarTower S R M
p✝ q p : Submodule R M
⊢ p ≠ ⊥ ↔ ∃ x, x ∈ p ∧ x ≠ 0
Theorem: Finset.prod_multiset_count
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: convert prod_multiset_map_count s id
state_before: ι : Type ?u.576196
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f g : α → β
inst✝² : CommMonoid β
inst✝¹ : DecidableEq α
inst✝ : CommMonoid α
s : Multiset α
⊢ Multiset.prod s = ∏ m in Multiset.toFinset s, m ^ Multiset.count m s

tactic: rw [Multiset.map_id]
state_before: case h.e'_2.h.e'_3
ι : Type ?u.576196
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f g : α → β
inst✝² : CommMonoid β
inst✝¹ : DecidableEq α
inst✝ : CommMonoid α
s : Multiset α
⊢ s = Multiset.map id s
Theorem: Finset.disjoint_range_addLeftEmbedding
File: Mathlib/Data/Finset/Image.lean

tactic: refine' disjoint_iff_inf_le.mpr _
state_before: α : Type ?u.45319
β : Type ?u.45322
γ : Type ?u.45325
f : α ↪ β
s : Finset α
a b : ℕ
⊢ _root_.Disjoint (range a) (map (addLeftEmbedding a) (range b))

tactic: intro k hk
state_before: α : Type ?u.45319
β : Type ?u.45322
γ : Type ?u.45325
f : α ↪ β
s : Finset α
a b : ℕ
⊢ range a ⊓ map (addLeftEmbedding a) (range b) ≤ ⊥

tactic: simp only [exists_prop, mem_range, inf_eq_inter, mem_map, addLeftEmbedding, mem_inter]
  at hk
state_before: α : Type ?u.45319
β : Type ?u.45322
γ : Type ?u.45325
f : α ↪ β
s : Finset α
a b k : ℕ
hk : k ∈ range a ⊓ map (addLeftEmbedding a) (range b)
⊢ k ∈ ⊥

tactic: obtain ⟨a, _, ha⟩ := hk.2
state_before: α : Type ?u.45319
β : Type ?u.45322
γ : Type ?u.45325
f : α ↪ β
s : Finset α
a b k : ℕ
hk : k < a ∧ ∃ a_1, a_1 < b ∧ ↑{ toFun := fun h => a + h, inj' := (_ : Injective ((fun x x_1 => x + x_1) a)) } a_1 = k
⊢ k ∈ ⊥

tactic: simpa [← ha] using hk.1
state_before: case intro.intro
α : Type ?u.45319
β : Type ?u.45322
γ : Type ?u.45325
f : α ↪ β
s : Finset α
a✝ b k : ℕ
hk : k < a✝ ∧ ∃ a, a < b ∧ ↑{ toFun := fun h => a✝ + h, inj' := (_ : Injective ((fun x x_1 => x + x_1) a✝)) } a = k
a : ℕ
left✝ : a < b
ha : ↑{ toFun := fun h => a✝ + h, inj' := (_ : Injective ((fun x x_1 => x + x_1) a✝)) } a = k
⊢ k ∈ ⊥
Theorem: toIocDiv_apply_right
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: simp [hp]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b c : α
n : ℤ
a : α
⊢ a + p - 0 • p ∈ Set.Ioc a (a + p)
Theorem: Filter.inf_neBot_iff_frequently_left
File: Mathlib/Order/Filter/Bases.lean

tactic: simp only [inf_neBot_iff, frequently_iff, and_comm]
state_before: α : Type u_1
β : Type ?u.60399
γ : Type ?u.60402
ι : Sort ?u.60405
ι' : Sort ?u.60408
l l' : Filter α
p : ι → Prop
s : ι → Set α
t : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
f g : Filter α
⊢ NeBot (f ⊓ g) ↔ ∀ {p : α → Prop}, (∀ᶠ (x : α) in f, p x) → ∃ᶠ (x : α) in g, p x

tactic: rfl
state_before: α : Type u_1
β : Type ?u.60399
γ : Type ?u.60402
ι : Sort ?u.60405
ι' : Sort ?u.60408
l l' : Filter α
p : ι → Prop
s : ι → Set α
t : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
f g : Filter α
⊢ (∀ ⦃s : Set α⦄, s ∈ f → ∀ ⦃s' : Set α⦄, s' ∈ g → Set.Nonempty (s ∩ s')) ↔
    ∀ {p : α → Prop}, (∀ᶠ (x : α) in f, p x) → ∀ {U : Set α}, U ∈ g → ∃ x, p x ∧ x ∈ U
Theorem: Path.refl_reparam
File: Mathlib/Topology/PathConnected.lean

tactic: ext
state_before: X : Type u_1
Y : Type ?u.540911
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type ?u.540926
γ : Path x y
f : ↑I → ↑I
hfcont : Continuous f
hf₀ : f 0 = 0
hf₁ : f 1 = 1
⊢ reparam (refl x) f hfcont hf₀ hf₁ = refl x

tactic: simp
state_before: case a.h
X : Type u_1
Y : Type ?u.540911
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type ?u.540926
γ : Path x y
f : ↑I → ↑I
hfcont : Continuous f
hf₀ : f 0 = 0
hf₁ : f 1 = 1
x✝ : ↑I
⊢ ↑(reparam (refl x) f hfcont hf₀ hf₁) x✝ = ↑(refl x) x✝
Theorem: Rat.preimage_cast_Ioi
File: Mathlib/Data/Rat/Cast.lean

tactic: ext x
state_before: F : Type ?u.78249
ι : Type ?u.78252
α : Type ?u.78255
β : Type ?u.78258
K : Type u_1
inst✝ : LinearOrderedField K
a : ℚ
⊢ Rat.cast ⁻¹' Ioi ↑a = Ioi a

tactic: simp
state_before: case h
F : Type ?u.78249
ι : Type ?u.78252
α : Type ?u.78255
β : Type ?u.78258
K : Type u_1
inst✝ : LinearOrderedField K
a x : ℚ
⊢ x ∈ Rat.cast ⁻¹' Ioi ↑a ↔ x ∈ Ioi a
Theorem: PNat.card_Ioo
File: Mathlib/Data/PNat/Interval.lean

tactic: rw [← Nat.card_Ioo]
state_before: a b : ℕ+
⊢ card (Ioo a b) = ↑b - ↑a - 1

tactic: erw [← Finset.map_subtype_embedding_Ioo _ a b (fun c x _ hx _ hc _ => hc.trans_le hx)]
state_before: a b : ℕ+
⊢ card (Ioo a b) = card (Ioo ↑a ↑b)

tactic: rw  [card_map]
state_before: a b : ℕ+
⊢ card (Ioo a b) = card (map (Function.Embedding.subtype fun n => 0 < n) (Ioo a b))
Theorem: GeneralizedContinuedFraction.terminatedAt_iff_s_terminatedAt
File: Mathlib/Algebra/ContinuedFractions/Translations.lean

tactic: rfl
state_before: α : Type u_1
g : GeneralizedContinuedFraction α
n : ℕ
⊢ TerminatedAt g n ↔ Stream'.Seq.TerminatedAt g.s n
Theorem: Nat.range_rec
File: Mathlib/Data/Nat/Set.lean

tactic: convert (range_of_succ (fun n => Nat.rec x f n : ℕ → α)).symm using 4
state_before: α✝ : Type ?u.3713
α : Type u_1
x : α
f : ℕ → α → α
⊢ (range fun n => rec x f n) = {x} ∪ range fun n => rec (f 0 x) (f ∘ succ) n

tactic: dsimp
state_before: case h.e'_3.h.e'_4.h.e'_3.h
α✝ : Type ?u.3713
α : Type u_1
x : α
f : ℕ → α → α
x✝ : ℕ
⊢ rec (f 0 x) (f ∘ succ) x✝ = ((fun n => rec x f n) ∘ succ) x✝

tactic: rename_i n
state_before: case h.e'_3.h.e'_4.h.e'_3.h
α✝ : Type ?u.3713
α : Type u_1
x : α
f : ℕ → α → α
x✝ : ℕ
⊢ rec (f 0 x) (f ∘ succ) x✝ = f x✝ (rec x f x✝)

tactic: induction' n with n ihn
state_before: case h.e'_3.h.e'_4.h.e'_3.h
α✝ : Type ?u.3713
α : Type u_1
x : α
f : ℕ → α → α
n : ℕ
⊢ rec (f 0 x) (f ∘ succ) n = f n (rec x f n)

tactic: rfl
state_before: case h.e'_3.h.e'_4.h.e'_3.h.zero
α✝ : Type ?u.3713
α : Type u_1
x : α
f : ℕ → α → α
⊢ rec (f 0 x) (f ∘ succ) zero = f zero (rec x f zero)

tactic: dsimp at ihn⊢
state_before: case h.e'_3.h.e'_4.h.e'_3.h.succ
α✝ : Type ?u.3713
α : Type u_1
x : α
f : ℕ → α → α
n : ℕ
ihn : rec (f 0 x) (f ∘ succ) n = f n (rec x f n)
⊢ rec (f 0 x) (f ∘ succ) (succ n) = f (succ n) (rec x f (succ n))

tactic: rw [ihn]
state_before: case h.e'_3.h.e'_4.h.e'_3.h.succ
α✝ : Type ?u.3713
α : Type u_1
x : α
f : ℕ → α → α
n : ℕ
ihn : rec (f 0 x) (f ∘ succ) n = f n (rec x f n)
⊢ f (succ n) (rec (f 0 x) (f ∘ succ) n) = f (succ n) (f n (rec x f n))
Theorem: Dense.diff_finset
File: Mathlib/Topology/Separation.lean

tactic: induction t using Finset.induction_on
state_before: α : Type u
β : Type v
inst✝² : TopologicalSpace α
inst✝¹ : T1Space α
inst✝ : ∀ (x : α), NeBot (𝓝[{x}ᶜ] x)
s : Set α
hs : Dense s
t : Finset α
⊢ Dense (s \ ↑t)

tactic: case empty =>  simpa using hs
state_before: case empty
α : Type u
β : Type v
inst✝² : TopologicalSpace α
inst✝¹ : T1Space α
inst✝ : ∀ (x : α), NeBot (𝓝[{x}ᶜ] x)
s : Set α
hs : Dense s
⊢ Dense (s \ ↑∅)

case insert
α : Type u
β : Type v
inst✝² : TopologicalSpace α
inst✝¹ : T1Space α
inst✝ : ∀ (x : α), NeBot (𝓝[{x}ᶜ] x)
s : Set α
hs : Dense s
a✝² : α
s✝ : Finset α
a✝¹ : ¬a✝² ∈ s✝
a✝ : Dense (s \ ↑s✝)
⊢ Dense (s \ ↑(insert a✝² s✝))

tactic: case insert ih =>
  rw [Finset.coe_insert, ← union_singleton, ← diff_diff]
  exact ih.diff_singleton _
state_before: case insert
α : Type u
β : Type v
inst✝² : TopologicalSpace α
inst✝¹ : T1Space α
inst✝ : ∀ (x : α), NeBot (𝓝[{x}ᶜ] x)
s : Set α
hs : Dense s
a✝² : α
s✝ : Finset α
a✝¹ : ¬a✝² ∈ s✝
a✝ : Dense (s \ ↑s✝)
⊢ Dense (s \ ↑(insert a✝² s✝))

tactic: simpa using hs
state_before: α : Type u
β : Type v
inst✝² : TopologicalSpace α
inst✝¹ : T1Space α
inst✝ : ∀ (x : α), NeBot (𝓝[{x}ᶜ] x)
s : Set α
hs : Dense s
⊢ Dense (s \ ↑∅)

tactic: rw [Finset.coe_insert, ← union_singleton, ← diff_diff]
state_before: α : Type u
β : Type v
inst✝² : TopologicalSpace α
inst✝¹ : T1Space α
inst✝ : ∀ (x : α), NeBot (𝓝[{x}ᶜ] x)
s : Set α
hs : Dense s
a✝¹ : α
s✝ : Finset α
a✝ : ¬a✝¹ ∈ s✝
ih : Dense (s \ ↑s✝)
⊢ Dense (s \ ↑(insert a✝¹ s✝))

tactic: exact ih.diff_singleton _
state_before: α : Type u
β : Type v
inst✝² : TopologicalSpace α
inst✝¹ : T1Space α
inst✝ : ∀ (x : α), NeBot (𝓝[{x}ᶜ] x)
s : Set α
hs : Dense s
a✝¹ : α
s✝ : Finset α
a✝ : ¬a✝¹ ∈ s✝
ih : Dense (s \ ↑s✝)
⊢ Dense ((s \ ↑s✝) \ {a✝¹})
Theorem: List.length_bind
File: Mathlib/Data/List/Join.lean

tactic: rw [List.bind, length_join, map_map]
state_before: α : Type u_1
β : Type u_2
l : List α
f : α → List β
⊢ length (List.bind l f) = sum (map (length ∘ f) l)
Theorem: Equiv.Perm.support_subtype_perm
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: ext
state_before: α : Type u_1
inst✝ : DecidableEq α
s : Finset α
f : Perm α
h : ∀ (x : α), x ∈ s ↔ ↑f x ∈ s
⊢ support (subtypePerm f h) = filter (fun x => decide (↑f ↑x ≠ ↑x) = true) (attach s)

tactic: simp [Subtype.ext_iff]
state_before: case a
α : Type u_1
inst✝ : DecidableEq α
s : Finset α
f : Perm α
h : ∀ (x : α), x ∈ s ↔ ↑f x ∈ s
a✝ : { x // x ∈ s }
⊢ a✝ ∈ support (subtypePerm f h) ↔ a✝ ∈ filter (fun x => decide (↑f ↑x ≠ ↑x) = true) (attach s)
Theorem: min_cases
File: Mathlib/Order/MinMax.lean

tactic: by_cases h : a ≤ b
state_before: α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a✝ b✝ c d a b : α
⊢ min a b = a ∧ a ≤ b ∨ min a b = b ∧ b < a

tactic: left
state_before: case pos
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a✝ b✝ c d a b : α
h : a ≤ b
⊢ min a b = a ∧ a ≤ b ∨ min a b = b ∧ b < a

tactic: exact ⟨min_eq_left h, h⟩
state_before: case pos.h
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a✝ b✝ c d a b : α
h : a ≤ b
⊢ min a b = a ∧ a ≤ b

tactic: right
state_before: case neg
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a✝ b✝ c d a b : α
h : ¬a ≤ b
⊢ min a b = a ∧ a ≤ b ∨ min a b = b ∧ b < a

tactic: exact ⟨min_eq_right (le_of_lt (not_le.mp h)), not_le.mp h⟩
state_before: case neg.h
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a✝ b✝ c d a b : α
h : ¬a ≤ b
⊢ min a b = b ∧ b < a
Theorem: PFun.mem_prodLift
File: Mathlib/Data/PFun.lean

tactic: trans ∃ hp hq, (f x).get hp = y.1 ∧ (g x).get hq = y.2
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type ?u.61352
ε : Type ?u.61355
ι : Type ?u.61358
f✝ f : α →. β
g : α →. γ
x : α
y : β × γ
⊢ y ∈ prodLift f g x ↔ y.fst ∈ f x ∧ y.snd ∈ g x

tactic: simp only [prodLift, Part.mem_mk_iff, And.exists, Prod.ext_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type ?u.61352
ε : Type ?u.61355
ι : Type ?u.61358
f✝ f : α →. β
g : α →. γ
x : α
y : β × γ
⊢ y ∈ prodLift f g x ↔ ∃ hp hq, Part.get (f x) hp = y.fst ∧ Part.get (g x) hq = y.snd
Theorem: MeasurableSet.exists_isCompact_diff_lt
File: Mathlib/MeasureTheory/Measure/Regular.lean

tactic: rcases hA.exists_isCompact_lt_add h'A hε with ⟨K, hKA, hKc, hK⟩
state_before: α : Type u_1
β : Type ?u.67344
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ : Measure α
inst✝² : OpensMeasurableSpace α
inst✝¹ : T2Space α
inst✝ : Regular μ
A : Set α
hA : MeasurableSet A
h'A : ↑↑μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
⊢ ∃ K, K ⊆ A ∧ IsCompact K ∧ ↑↑μ (A \ K) < ε

tactic: exact
  ⟨K, hKA, hKc,
    measure_diff_lt_of_lt_add hKc.measurableSet hKA (ne_top_of_le_ne_top h'A <| measure_mono hKA)
      hK⟩
state_before: case intro.intro.intro
α : Type u_1
β : Type ?u.67344
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ : Measure α
inst✝² : OpensMeasurableSpace α
inst✝¹ : T2Space α
inst✝ : Regular μ
A : Set α
hA : MeasurableSet A
h'A : ↑↑μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
K : Set α
hKA : K ⊆ A
hKc : IsCompact K
hK : ↑↑μ A < ↑↑μ K + ε
⊢ ∃ K, K ⊆ A ∧ IsCompact K ∧ ↑↑μ (A \ K) < ε
Theorem: Mathlib.Tactic.Abel.term_add_termg
File: Mathlib/Tactic/Abel.lean

tactic: simp [h₁.symm, h₂.symm, termg, add_zsmul]
state_before: α : Type u_1
inst✝ : AddCommGroup α
n₁ : ℤ
x a₁ : α
n₂ : ℤ
a₂ : α
n' : ℤ
a' : α
h₁ : n₁ + n₂ = n'
h₂ : a₁ + a₂ = a'
⊢ termg n₁ x a₁ + termg n₂ x a₂ = termg n' x a'

tactic: exact add_add_add_comm (n₁ • x) a₁ (n₂ • x) a₂
state_before: α : Type u_1
inst✝ : AddCommGroup α
n₁ : ℤ
x a₁ : α
n₂ : ℤ
a₂ : α
n' : ℤ
a' : α
h₁ : n₁ + n₂ = n'
h₂ : a₁ + a₂ = a'
⊢ n₁ • x + a₁ + (n₂ • x + a₂) = n₁ • x + n₂ • x + (a₁ + a₂)
Theorem: Zsqrtd.sqLe_add
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: have xz := sqLe_add_mixed xy zw
state_before: d✝ : ℤ
c d x y z w : ℕ
xy : SqLe x c y d
zw : SqLe z c w d
⊢ SqLe (x + z) c (y + w) d

tactic: simp [SqLe, mul_assoc] at xy zw
state_before: d✝ : ℤ
c d x y z w : ℕ
xy : SqLe x c y d
zw : SqLe z c w d
xz : c * (x * z) ≤ d * (y * w)
⊢ SqLe (x + z) c (y + w) d

tactic: simp [SqLe, mul_add, mul_comm, mul_left_comm, add_le_add, *]
state_before: d✝ : ℤ
c d x y z w : ℕ
xz : c * (x * z) ≤ d * (y * w)
xy : c * (x * x) ≤ d * (y * y)
zw : c * (z * z) ≤ d * (w * w)
⊢ SqLe (x + z) c (y + w) d
Theorem: catalan_two
File: Mathlib/Combinatorics/Catalan.lean

tactic: unfold catalan
state_before: ⊢ catalan 2 = 2

tactic: rfl
state_before: ⊢ ∑ i : Fin (Nat.succ 1), catalan ↑i * catalan (1 - ↑i) = 2
Theorem: Ordinal.mul_isNormal
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: dsimp only
state_before: α : Type ?u.209856
β : Type ?u.209859
γ : Type ?u.209862
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a : Ordinal
h : 0 < a
b : Ordinal
⊢ (fun x x_1 => x * x_1) a b < (fun x x_1 => x * x_1) a (succ b)

tactic: rw [mul_succ]
state_before: α : Type ?u.209856
β : Type ?u.209859
γ : Type ?u.209862
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a : Ordinal
h : 0 < a
b : Ordinal
⊢ a * b < a * succ b

tactic: simpa only [add_zero] using (add_lt_add_iff_left (a * b)).2 h
state_before: α : Type ?u.209856
β : Type ?u.209859
γ : Type ?u.209862
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a : Ordinal
h : 0 < a
b : Ordinal
⊢ a * b < a * b + a
Theorem: Equiv.Perm.SameCycle.exists_pow_eq_of_mem_support
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: rw [mem_support] at hx
state_before: ι : Type ?u.2586211
α : Type u_1
β : Type ?u.2586217
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y : α
h : SameCycle f x y
hx : x ∈ support f
⊢ ∃ i x_1, ↑(f ^ i) x = y

tactic: have := Equiv.Perm.IsCycleOn.exists_pow_eq (b := y) (f.isCycleOn_support_cycleOf x)
  (by rw [mem_support_cycleOf_iff' hx]) (by rwa [mem_support_cycleOf_iff' hx])
state_before: ι : Type ?u.2586211
α : Type u_1
β : Type ?u.2586217
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y : α
h : SameCycle f x y
hx : ↑f x ≠ x
⊢ ∃ i x_1, ↑(f ^ i) x = y

tactic: simp_rw [← exists_prop] at this
state_before: ι : Type ?u.2586211
α : Type u_1
β : Type ?u.2586217
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y : α
h : SameCycle f x y
hx : ↑f x ≠ x
this : ∃ n, n < card (support (cycleOf f x)) ∧ ↑(f ^ n) x = y
⊢ ∃ i x_1, ↑(f ^ i) x = y

tactic: exact this
state_before: ι : Type ?u.2586211
α : Type u_1
β : Type ?u.2586217
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y : α
h : SameCycle f x y
hx : ↑f x ≠ x
this : ∃ n _h, ↑(f ^ n) x = y
⊢ ∃ i x_1, ↑(f ^ i) x = y

tactic: rw [mem_support_cycleOf_iff' hx]
state_before: ι : Type ?u.2586211
α : Type u_1
β : Type ?u.2586217
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y : α
h : SameCycle f x y
hx : ↑f x ≠ x
⊢ ?m.2617372 ∈ support (cycleOf f x)

tactic: rwa [mem_support_cycleOf_iff' hx]
state_before: ι : Type ?u.2586211
α : Type u_1
β : Type ?u.2586217
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y : α
h : SameCycle f x y
hx : ↑f x ≠ x
⊢ y ∈ support (cycleOf f x)