tasksource/leandojo huggingface dataset:
Theorem: Finset.prod_dite_of_true
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: simp
state_before: ι : Type ?u.428568
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
hp : DecidablePred p
h : ∀ (x : α), x ∈ s → p x
f : (x : α) → p x → β
g : (x : α) → ¬p x → β
x : α
hx : x ∈ s
⊢ (fun x hx => { val := x, property := hx }) x hx ∈ univ

tactic: dsimp
state_before: ι : Type ?u.428568
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a✝ : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
hp : DecidablePred p
h : ∀ (x : α), x ∈ s → p x
f : (x : α) → p x → β
g : (x : α) → ¬p x → β
a : α
ha : a ∈ s
⊢ (if hx : p a then f a hx else g a hx) =
    f ↑((fun x hx => { val := x, property := hx }) a ha) (_ : p ↑((fun x hx => { val := x, property := hx }) a ha))

tactic: rw [dif_pos]
state_before: ι : Type ?u.428568
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a✝ : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
hp : DecidablePred p
h : ∀ (x : α), x ∈ s → p x
f : (x : α) → p x → β
g : (x : α) → ¬p x → β
a : α
ha : a ∈ s
⊢ (if hx : p a then f a hx else g a hx) = f a (_ : p a)

tactic: simp
state_before: ι : Type ?u.428568
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝ : CommMonoid β
p : α → Prop
hp : DecidablePred p
h : ∀ (x : α), x ∈ s → p x
f : (x : α) → p x → β
g : (x : α) → ¬p x → β
b : { x // x ∈ s }
_hb : b ∈ univ
⊢ b = (fun x hx => { val := x, property := hx }) ↑b (_ : ↑b ∈ s)
Theorem: Ordinal.unbounded_of_unbounded_sUnion
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: by_contra' h
state_before: α : Type u_1
r✝ r : α → α → Prop
wo : IsWellOrder α r
s : Set (Set α)
h₁ : Unbounded r (⋃₀ s)
h₂ : (#↑s) < StrictOrder.cof r
⊢ ∃ x, x ∈ s ∧ Unbounded r x

tactic: simp_rw [not_unbounded_iff] at h
state_before: α : Type u_1
r✝ r : α → α → Prop
wo : IsWellOrder α r
s : Set (Set α)
h₁ : Unbounded r (⋃₀ s)
h₂ : (#↑s) < StrictOrder.cof r
h : ∀ (x : Set α), x ∈ s → ¬Unbounded r x
⊢ False

tactic: let f : s → α := fun x : s => wo.wf.sup x (h x.1 x.2)
state_before: α : Type u_1
r✝ r : α → α → Prop
wo : IsWellOrder α r
s : Set (Set α)
h₁ : Unbounded r (⋃₀ s)
h₂ : (#↑s) < StrictOrder.cof r
h : ∀ (x : Set α), x ∈ s → Bounded r x
⊢ False

tactic: refine' h₂.not_le (le_trans (csInf_le' ⟨range f, fun x => _, rfl⟩) mk_range_le)
state_before: α : Type u_1
r✝ r : α → α → Prop
wo : IsWellOrder α r
s : Set (Set α)
h₁ : Unbounded r (⋃₀ s)
h₂ : (#↑s) < StrictOrder.cof r
h : ∀ (x : Set α), x ∈ s → Bounded r x
f : ↑s → α := fun x => WellFounded.sup (_ : WellFounded r) ↑x (_ : Bounded r ↑x)
⊢ False

tactic: rcases h₁ x with ⟨y, ⟨c, hc, hy⟩, hxy⟩
state_before: α : Type u_1
r✝ r : α → α → Prop
wo : IsWellOrder α r
s : Set (Set α)
h₁ : Unbounded r (⋃₀ s)
h₂ : (#↑s) < StrictOrder.cof r
h : ∀ (x : Set α), x ∈ s → Bounded r x
f : ↑s → α := fun x => WellFounded.sup (_ : WellFounded r) ↑x (_ : Bounded r ↑x)
x : α
⊢ ∃ b, b ∈ range f ∧ (swap rᶜ) x b

tactic: exact ⟨f ⟨c, hc⟩, mem_range_self _, fun hxz => hxy (Trans.trans (wo.wf.lt_sup _ hy) hxz)⟩
state_before: case intro.intro.intro.intro
α : Type u_1
r✝ r : α → α → Prop
wo : IsWellOrder α r
s : Set (Set α)
h₁ : Unbounded r (⋃₀ s)
h₂ : (#↑s) < StrictOrder.cof r
h : ∀ (x : Set α), x ∈ s → Bounded r x
f : ↑s → α := fun x => WellFounded.sup (_ : WellFounded r) ↑x (_ : Bounded r ↑x)
x y : α
hxy : ¬r y x
c : Set α
hc : c ∈ s
hy : y ∈ c
⊢ ∃ b, b ∈ range f ∧ (swap rᶜ) x b
Theorem: ENNReal.tsum_const_smul
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: simpa only [smul_one_mul] using @ENNReal.tsum_mul_left _ (a • (1 : ℝ≥0∞)) _
state_before: α : Type u_2
β : Type ?u.256888
γ : Type ?u.256891
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α → ℝ≥0∞
R : Type u_1
inst✝¹ : SMul R ℝ≥0∞
inst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
a : R
⊢ (∑' (i : α), a • f i) = a • ∑' (i : α), f i
Theorem: Nat.clog_of_two_le
File: Mathlib/Data/Nat/Log.lean

tactic: rw [clog, dif_pos (⟨hb, hn⟩ : 1 < b ∧ 1 < n)]
state_before: b n : ℕ
hb : 1 < b
hn : 2 ≤ n
⊢ clog b n = clog b ((n + b - 1) / b) + 1
Theorem: LowerSet.symm_map
File: Mathlib/Order/UpperLower/Basic.lean

tactic: convert Set.preimage_equiv_eq_image_symm s f.toEquiv
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.101991
ι : Sort ?u.101994
κ : ι → Sort ?u.101999
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f✝ : α ≃o β
s✝ t : LowerSet α
a : α
b : β
f : α ≃o β
s : LowerSet β
⊢ ↑(↑(OrderIso.symm (map f)) s) = ↑(↑(map (OrderIso.symm f)) s)
Theorem: Real.logb_le_logb_of_base_lt_one
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: rw [logb, logb, div_le_div_right_of_neg (log_neg b_pos b_lt_one), log_le_log h₁ h]
state_before: b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
h : 0 < x
h₁ : 0 < y
⊢ logb b x ≤ logb b y ↔ y ≤ x
Theorem: AddSubgroup.norm_normedMk_le
File: Mathlib/Analysis/Normed/Group/Quotient.lean

tactic: simp [quotient_norm_mk_le']
state_before: M : Type u_1
N : Type ?u.424521
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
⊢ ‖↑(normedMk S) m‖ ≤ 1 * ‖m‖
Theorem: tsum_dite_right
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

tactic: by_cases hP : P <;> simp [hP]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.326054
δ : Type ?u.326057
inst✝³ : AddCommMonoid α
inst✝² : TopologicalSpace α
inst✝¹ : T2Space α
f g : β → α
a a₁ a₂ : α
P : Prop
inst✝ : Decidable P
x : β → ¬P → α
⊢ (∑' (b : β), if h : P then 0 else x b h) = if h : P then 0 else ∑' (b : β), x b h
Theorem: Sigma.le_def
File: Mathlib/Data/Sigma/Order.lean

tactic: constructor
state_before: ι : Type u_2
α : ι → Type u_1
inst✝ : (i : ι) → LE (α i)
a b : (i : ι) × α i
⊢ a ≤ b ↔ ∃ h, h ▸ a.snd ≤ b.snd

tactic: rintro ⟨i, a, b, h⟩
state_before: case mp
ι : Type u_2
α : ι → Type u_1
inst✝ : (i : ι) → LE (α i)
a b : (i : ι) × α i
⊢ a ≤ b → ∃ h, h ▸ a.snd ≤ b.snd

tactic: exact ⟨rfl, h⟩
state_before: case mp.fiber
ι : Type u_2
α : ι → Type u_1
inst✝ : (i : ι) → LE (α i)
i : ι
a b : α i
h : a ≤ b
⊢ ∃ h, h ▸ { fst := i, snd := a }.snd ≤ { fst := i, snd := b }.snd

tactic: obtain ⟨i, a⟩ := a
state_before: case mpr
ι : Type u_2
α : ι → Type u_1
inst✝ : (i : ι) → LE (α i)
a b : (i : ι) × α i
⊢ (∃ h, h ▸ a.snd ≤ b.snd) → a ≤ b

tactic: obtain ⟨j, b⟩ := b
state_before: case mpr.mk
ι : Type u_2
α : ι → Type u_1
inst✝ : (i : ι) → LE (α i)
b : (i : ι) × α i
i : ι
a : α i
⊢ (∃ h, h ▸ { fst := i, snd := a }.snd ≤ b.snd) → { fst := i, snd := a } ≤ b

tactic: rintro ⟨rfl : i = j, h⟩
state_before: case mpr.mk.mk
ι : Type u_2
α : ι → Type u_1
inst✝ : (i : ι) → LE (α i)
i : ι
a : α i
j : ι
b : α j
⊢ (∃ h, h ▸ { fst := i, snd := a }.snd ≤ { fst := j, snd := b }.snd) → { fst := i, snd := a } ≤ { fst := j, snd := b }

tactic: exact le.fiber _ _ _ h
state_before: case mpr.mk.mk.intro
ι : Type u_2
α : ι → Type u_1
inst✝ : (i : ι) → LE (α i)
i : ι
a b : α i
h : (_ : i = i) ▸ { fst := i, snd := a }.snd ≤ { fst := i, snd := b }.snd
⊢ { fst := i, snd := a } ≤ { fst := i, snd := b }
Theorem: WithTop.preimage_coe_Ioo_top
File: Mathlib/Data/Set/Intervals/WithBotTop.lean

tactic: simp [← Ioi_inter_Iio]
state_before: α : Type u_1
inst✝ : PartialOrder α
a b : α
⊢ some ⁻¹' Ioo ↑a ⊤ = Ioi a
Theorem: Finset.eventually_constant_prod
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: obtain ⟨m, rfl : n = N + m⟩ := le_iff_exists_add.mp hn
state_before: ι : Type ?u.436010
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ (n : ℕ), n ≥ N → u n = 1
n : ℕ
hn : N ≤ n
⊢ ∏ k in range (n + 1), u k = ∏ k in range (N + 1), u k

tactic: clear hn
state_before: case intro
ι : Type ?u.436010
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ (n : ℕ), n ≥ N → u n = 1
m : ℕ
hn : N ≤ N + m
⊢ ∏ k in range (N + m + 1), u k = ∏ k in range (N + 1), u k

tactic: induction' m with m hm
state_before: case intro
ι : Type ?u.436010
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ (n : ℕ), n ≥ N → u n = 1
m : ℕ
⊢ ∏ k in range (N + m + 1), u k = ∏ k in range (N + 1), u k

tactic: erw [prod_range_succ, hm]
state_before: case intro.succ
ι : Type ?u.436010
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ (n : ℕ), n ≥ N → u n = 1
m : ℕ
hm : ∏ k in range (N + m + 1), u k = ∏ k in range (N + 1), u k
⊢ ∏ k in range (N + Nat.succ m + 1), u k = ∏ k in range (N + 1), u k

tactic: simp [hu, @zero_le' ℕ]
state_before: case intro.succ
ι : Type ?u.436010
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ (n : ℕ), n ≥ N → u n = 1
m : ℕ
hm : ∏ k in range (N + m + 1), u k = ∏ k in range (N + 1), u k
⊢ (∏ k in range (N + 1), u k) * u (N + Nat.succ m) = ∏ k in range (N + 1), u k

tactic: simp
state_before: case intro.zero
ι : Type ?u.436010
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
u : ℕ → β
N : ℕ
hu : ∀ (n : ℕ), n ≥ N → u n = 1
⊢ ∏ k in range (N + Nat.zero + 1), u k = ∏ k in range (N + 1), u k
Theorem: NNRat.coe_sub
File: Mathlib/Data/Rat/NNRat.lean

tactic: rwa [sub_zero]
state_before: α : Type ?u.13919
p q : ℚ≥0
h : q ≤ p
⊢ ↑q ≤ ↑p - 0
Theorem: BoundedContinuousFunction.exists_extension_forall_mem_of_closedEmbedding
File: Mathlib/Topology/TietzeExtension.lean

tactic: cases isEmpty_or_nonempty X
state_before: X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f

tactic: rcases exists_extension_forall_exists_le_ge_of_closedEmbedding f he with ⟨g, hg, hgf⟩
state_before: case inr
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h✝ : Nonempty X
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f

tactic: refine' ⟨g, fun y => _, hgf⟩
state_before: case inr.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h✝ : Nonempty X
g : Y →ᵇ ℝ
hg : ∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)
hgf : ↑g ∘ e = ↑f
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f

tactic: rcases hg y with ⟨xl, xu, h⟩
state_before: case inr.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h✝ : Nonempty X
g : Y →ᵇ ℝ
hg : ∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)
hgf : ↑g ∘ e = ↑f
y : Y
⊢ ↑g y ∈ t

tactic: exact hs.out (hf _) (hf _) h
state_before: case inr.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h✝ : Nonempty X
g : Y →ᵇ ℝ
hg : ∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)
hgf : ↑g ∘ e = ↑f
y : Y
xl xu : X
h : ↑g y ∈ Icc (↑f xl) (↑f xu)
⊢ ↑g y ∈ t

tactic: rcases hne with ⟨c, hc⟩
state_before: case inl
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h✝ : IsEmpty X
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f

tactic: refine' ⟨const Y c, fun _ => hc, funext fun x => isEmptyElim x⟩
state_before: case inl.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
he : ClosedEmbedding e
h✝ : IsEmpty X
c : ℝ
hc : c ∈ t
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
Theorem: Polynomial.natDegree_mul
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: rw [← WithBot.coe_eq_coe, ← Nat.cast_withBot, ←degree_eq_natDegree (mul_ne_zero hp hq),
  WithBot.coe_add, ← Nat.cast_withBot, ←degree_eq_natDegree hp, ← Nat.cast_withBot,
  ← degree_eq_natDegree hq, degree_mul]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : p ≠ 0
hq : q ≠ 0
⊢ natDegree (p * q) = natDegree p + natDegree q
Theorem: List.pair_mem_product
File: Std/Data/List/Lemmas.lean

tactic: simp only [product, and_imp, exists_prop, mem_map, Prod.mk.injEq,
  exists_eq_right_right, mem_bind, iff_self]
state_before: α : Type u_1
β : Type u_2
xs : List α
ys : List β
x : α
y : β
⊢ (x, y) ∈ product xs ys ↔ x ∈ xs ∧ y ∈ ys
Theorem: Nat.cast_choose_two
File: Mathlib/Data/Nat/Choose/Cast.lean

tactic: rw [← cast_descFactorial_two, descFactorial_eq_factorial_mul_choose, factorial_two, mul_comm,
  cast_mul, cast_two, eq_div_iff_mul_eq (two_ne_zero : (2 : K) ≠ 0)]
state_before: K : Type u_1
inst✝¹ : DivisionRing K
inst✝ : CharZero K
a : ℕ
⊢ ↑(choose a 2) = ↑a * (↑a - 1) / 2
Theorem: ENNReal.le_rpow_self_of_one_le
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: nth_rw 1 [← ENNReal.rpow_one x]
state_before: x : ℝ≥0∞
z : ℝ
hx : 1 ≤ x
h_one_le : 1 ≤ z
⊢ x ≤ x ^ z

tactic: exact ENNReal.rpow_le_rpow_of_exponent_le hx h_one_le
state_before: x : ℝ≥0∞
z : ℝ
hx : 1 ≤ x
h_one_le : 1 ≤ z
⊢ x ^ 1 ≤ x ^ z
Theorem: exists_eq_right'
File: Mathlib/Logic/Basic.lean

tactic: simp [@eq_comm _ a']
state_before: ι : Sort ?u.20626
α : Sort u_1
κ : ι → Sort ?u.20628
p q : α → Prop
a' : α
⊢ (∃ a, p a ∧ a' = a) ↔ p a'
Theorem: Finpartition.mk_mem_nonUniforms_iff
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean

tactic: rw [nonUniforms, mem_filter, mem_offDiag, and_assoc, and_assoc]
state_before: α : Type u_1
𝕜 : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
A : Finset α
P : Finpartition A
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε✝ : 𝕜
u v : Finset α
ε : 𝕜
⊢ (u, v) ∈ nonUniforms P G ε ↔ u ∈ P.parts ∧ v ∈ P.parts ∧ u ≠ v ∧ ¬SimpleGraph.IsUniform G ε u v
Theorem: Real.exp_log_eq_abs
File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

tactic: rw [log_of_ne_zero hx, ← coe_expOrderIso_apply, OrderIso.apply_symm_apply, Subtype.coe_mk]
state_before: x y : ℝ
hx : x ≠ 0
⊢ exp (log x) = abs x
Theorem: Multiset.count_filter_of_pos
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp only [quot_mk_to_coe'', coe_filter, mem_coe, coe_count, decide_eq_true_eq]
state_before: α : Type u_1
β : Type ?u.396498
γ : Type ?u.396501
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
a : α
s : Multiset α
h : p a
_l : List α
⊢ count a (filter p (Quot.mk Setoid.r _l)) = count a (Quot.mk Setoid.r _l)

tactic: apply count_filter
state_before: α : Type u_1
β : Type ?u.396498
γ : Type ?u.396501
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
a : α
s : Multiset α
h : p a
_l : List α
⊢ List.count a (List.filter (fun b => decide (p b)) _l) = List.count a _l

tactic: simpa using h
state_before: case h
α : Type u_1
β : Type ?u.396498
γ : Type ?u.396501
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
a : α
s : Multiset α
h : p a
_l : List α
⊢ decide (p a) = true
Theorem: Units.inv_eq_of_mul_eq_one_right
File: Mathlib/Algebra/Group/Units.lean

tactic: rw [mul_one]
state_before: α : Type u
inst✝ : Monoid α
a✝ b c u : αˣ
a : α
h : ↑u * a = 1
⊢ ↑u⁻¹ = ↑u⁻¹ * 1

tactic: rw [← h, inv_mul_cancel_left]
state_before: α : Type u
inst✝ : Monoid α
a✝ b c u : αˣ
a : α
h : ↑u * a = 1
⊢ ↑u⁻¹ * 1 = a
Theorem: Stream'.WSeq.toList'_cons
File: Mathlib/Data/Seq/WSeq.lean

tactic: simp [toList, cons]
state_before: α : Type u
β : Type v
γ : Type w
l : List α
s : WSeq α
a : α
⊢ Computation.destruct
      (Computation.corec
        (fun x =>
          match x with
          | (l, s) =>
            match Seq.destruct s with
            | none => Sum.inl (List.reverse l)
            | some (none, s') => Sum.inr (l, s')
            | some (some a, s') => Sum.inr (a :: l, s'))
        (l, cons a s)) =
    Sum.inr
      (Computation.corec
        (fun x =>
          match x with
          | (l, s) =>
            match Seq.destruct s with
            | none => Sum.inl (List.reverse l)
            | some (none, s') => Sum.inr (l, s')
            | some (some a, s') => Sum.inr (a :: l, s'))
        (a :: l, s))
Theorem: Ordinal.isClosed_iff_sup
File: Mathlib/SetTheory/Ordinal/Topology.lean

tactic: use fun hs ι hι f hf => (mem_closed_iff_sup hs).2 ⟨ι, hι, f, hf, rfl⟩
state_before: s : Set Ordinal
a : Ordinal
⊢ IsClosed s ↔ ∀ {ι : Type u}, Nonempty ι → ∀ (f : ι → Ordinal), (∀ (i : ι), f i ∈ s) → sup f ∈ s

tactic: rw [← closure_subset_iff_isClosed]
state_before: s : Set Ordinal
a : Ordinal
⊢ (∀ {ι : Type u}, Nonempty ι → ∀ (f : ι → Ordinal), (∀ (i : ι), f i ∈ s) → sup f ∈ s) → IsClosed s

tactic: intro h x hx
state_before: s : Set Ordinal
a : Ordinal
⊢ (∀ {ι : Type u}, Nonempty ι → ∀ (f : ι → Ordinal), (∀ (i : ι), f i ∈ s) → sup f ∈ s) → closure s ⊆ s

tactic: rcases mem_closure_iff_sup.1 hx with ⟨ι, hι, f, hf, rfl⟩
state_before: s : Set Ordinal
a : Ordinal
h : ∀ {ι : Type u}, Nonempty ι → ∀ (f : ι → Ordinal), (∀ (i : ι), f i ∈ s) → sup f ∈ s
x : Ordinal
hx : x ∈ closure s
⊢ x ∈ s

tactic: exact h hι f hf
state_before: case intro.intro.intro.intro
s : Set Ordinal
a : Ordinal
h : ∀ {ι : Type u}, Nonempty ι → ∀ (f : ι → Ordinal), (∀ (i : ι), f i ∈ s) → sup f ∈ s
ι : Type u
hι : Nonempty ι
f : ι → Ordinal
hf : ∀ (i : ι), f i ∈ s
hx : sup f ∈ closure s
⊢ sup f ∈ s
Theorem: GroupCat.FilteredColimits.colimitInvAux_eq_of_rel
File: Mathlib/Algebra/Category/GroupCat/FilteredColimits.lean

tactic: apply G.mk_eq
state_before: J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ GroupCat
x y : (j : J) × ↑(F.obj j)
h : Types.FilteredColimit.Rel (F ⋙ forget GroupCat) x y
⊢ colimitInvAux F x = colimitInvAux F y

tactic: obtain ⟨k, f, g, hfg⟩ := h
state_before: case h
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ GroupCat
x y : (j : J) × ↑(F.obj j)
h : Types.FilteredColimit.Rel (F ⋙ forget GroupCat) x y
⊢ ∃ k f g, ↑(F.map f) { fst := x.fst, snd := x.snd⁻¹ }.snd = ↑(F.map g) { fst := y.fst, snd := y.snd⁻¹ }.snd

tactic: use k, f, g
state_before: case h.intro.intro.intro
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ GroupCat
x y : (j : J) × ↑(F.obj j)
k : J
f : x.fst ⟶ k
g : y.fst ⟶ k
hfg : (F ⋙ forget GroupCat).map f x.snd = (F ⋙ forget GroupCat).map g y.snd
⊢ ∃ k f g, ↑(F.map f) { fst := x.fst, snd := x.snd⁻¹ }.snd = ↑(F.map g) { fst := y.fst, snd := y.snd⁻¹ }.snd

tactic: rw [MonoidHom.map_inv, MonoidHom.map_inv, inv_inj]
state_before: case h.intro.intro.intro
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ GroupCat
x y : (j : J) × ↑(F.obj j)
k : J
f : x.fst ⟶ k
g : y.fst ⟶ k
hfg : (F ⋙ forget GroupCat).map f x.snd = (F ⋙ forget GroupCat).map g y.snd
⊢ ↑(F.map f) { fst := x.fst, snd := x.snd⁻¹ }.snd = ↑(F.map g) { fst := y.fst, snd := y.snd⁻¹ }.snd

tactic: exact hfg
state_before: case h.intro.intro.intro
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ GroupCat
x y : (j : J) × ↑(F.obj j)
k : J
f : x.fst ⟶ k
g : y.fst ⟶ k
hfg : (F ⋙ forget GroupCat).map f x.snd = (F ⋙ forget GroupCat).map g y.snd
⊢ ↑(F.map f) x.snd = ↑(F.map g) y.snd
Theorem: finprod_mem_insert_of_eq_one_if_not_mem
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: refine' finprod_mem_inter_mulSupport_eq' _ _ _ fun x hx => ⟨_, Or.inr⟩
state_before: α : Type u_1
β : Type ?u.345276
ι : Type ?u.345279
G : Type ?u.345282
M : Type u_2
N : Type ?u.345288
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
h : ¬a ∈ s → f a = 1
⊢ (∏ᶠ (i : α) (_ : i ∈ insert a s), f i) = ∏ᶠ (i : α) (_ : i ∈ s), f i

tactic: rintro (rfl | hxs)
state_before: α : Type u_1
β : Type ?u.345276
ι : Type ?u.345279
G : Type ?u.345282
M : Type u_2
N : Type ?u.345288
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
h : ¬a ∈ s → f a = 1
x : α
hx : x ∈ mulSupport fun i => f i
⊢ x ∈ insert a s → x ∈ s

tactic: exacts [not_imp_comm.1 h hx, hxs]
state_before: case inl
α : Type u_1
β : Type ?u.345276
ι : Type ?u.345279
G : Type ?u.345282
M : Type u_2
N : Type ?u.345288
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
b : α
s t : Set α
x : α
hx : x ∈ mulSupport fun i => f i
h : ¬x ∈ s → f x = 1
⊢ x ∈ s

case inr
α : Type u_1
β : Type ?u.345276
ι : Type ?u.345279
G : Type ?u.345282
M : Type u_2
N : Type ?u.345288
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
h : ¬a ∈ s → f a = 1
x : α
hx : x ∈ mulSupport fun i => f i
hxs : x ∈ s
⊢ x ∈ s
Theorem: CategoryTheory.IsPushout.of_horiz_isIso
File: Mathlib/CategoryTheory/Limits/Shapes/CommSq.lean

tactic: refine'
  PushoutCocone.IsColimit.mk _ (fun s => inv inr ≫ s.inr) (fun s => _)
    (by aesop_cat) (by aesop_cat)
state_before: C : Type u₁
inst✝² : Category C
Z X Y P : C
f : Z ⟶ X
g : Z ⟶ Y
inl : X ⟶ P
inr : Y ⟶ P
inst✝¹ : IsIso f
inst✝ : IsIso inr
sq : CommSq f g inl inr
⊢ IsColimit (CommSq.cocone sq)

tactic: simp only [← cancel_epi f, s.condition, sq.w_assoc, IsIso.hom_inv_id_assoc]
state_before: C : Type u₁
inst✝² : Category C
Z X Y P : C
f : Z ⟶ X
g : Z ⟶ Y
inl : X ⟶ P
inr : Y ⟶ P
inst✝¹ : IsIso f
inst✝ : IsIso inr
sq : CommSq f g inl inr
s : PushoutCocone f g
⊢ inl ≫ (fun s => inv inr ≫ PushoutCocone.inr s) s = PushoutCocone.inl s

tactic: aesop_cat
state_before: C : Type u₁
inst✝² : Category C
Z X Y P : C
f : Z ⟶ X
g : Z ⟶ Y
inl : X ⟶ P
inr : Y ⟶ P
inst✝¹ : IsIso f
inst✝ : IsIso inr
sq : CommSq f g inl inr
⊢ ∀ (s : PushoutCocone f g), inr ≫ (fun s => inv inr ≫ PushoutCocone.inr s) s = PushoutCocone.inr s

tactic: aesop_cat
state_before: C : Type u₁
inst✝² : Category C
Z X Y P : C
f : Z ⟶ X
g : Z ⟶ Y
inl : X ⟶ P
inr : Y ⟶ P
inst✝¹ : IsIso f
inst✝ : IsIso inr
sq : CommSq f g inl inr
⊢ ∀ (s : PushoutCocone f g) (m : P ⟶ s.pt),
    inl ≫ m = PushoutCocone.inl s → inr ≫ m = PushoutCocone.inr s → m = (fun s => inv inr ≫ PushoutCocone.inr s) s
Theorem: Turing.PartrecToTM2.codeSupp_case
File: Mathlib/Computability/TMToPartrec.lean

tactic: simp [codeSupp, codeSupp', contSupp, Finset.union_assoc, Finset.union_left_comm]
state_before: f g : Code
k : Cont'
⊢ codeSupp (Code.case f g) k = trStmts₁ (trNormal (Code.case f g) k) ∪ (codeSupp f k ∪ codeSupp g k)
Theorem: Bool.and_elim_left
File: Mathlib/Data/Bool/Basic.lean

tactic: decide
state_before: ⊢ ∀ {a b : Bool}, (a && b) = true → a = true
Theorem: round_add_nat
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [round, round, fract_add_nat, Int.floor_add_nat, Int.ceil_add_nat, ← apply_ite₂, ite_self]
state_before: F : Type ?u.256390
α : Type u_1
β : Type ?u.256396
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
x : α
y : ℕ
⊢ round (x + ↑y) = round x + ↑y
Theorem: Algebra.mul_sub_algebraMap_commutes
File: Mathlib/Algebra/Algebra/Basic.lean

tactic: rw [mul_sub, ← commutes, sub_mul]
state_before: R : Type u
S : Type v
A : Type w
B : Type ?u.536240
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
x : A
r : R
⊢ x * (x - ↑(algebraMap R A) r) = (x - ↑(algebraMap R A) r) * x