1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: MeasureTheory.lmarginal_le_of_subset
File: Mathlib/MeasureTheory/Integral/Marginal.lean

tactic: rw [← union_sdiff_of_subset hst, lmarginal_union' μ f hf disjoint_sdiff,
  lmarginal_union' μ g hg disjoint_sdiff]
state_before: δ : Type u_1
δ' : Type u_2
π : δ → Type u_3
inst✝² : (x : δ) → MeasurableSpace (π x)
μ : (i : δ) → Measure (π i)
inst✝¹ : ∀ (i : δ), SigmaFinite (μ i)
inst✝ : DecidableEq δ
s t : Finset δ
f✝ g✝ : ((i : δ) → π i) → ℝ≥0∞
x y : (i : δ) → π i
i : δ
f g : ((i : δ) → π i) → ℝ≥0∞
hst : s ⊆ t
hf : Measurable f
hg : Measurable g
hfg : ∫⋯∫⁻_s, f ∂μ ≤ ∫⋯∫⁻_s, g ∂μ
⊢ ∫⋯∫⁻_t, f ∂μ ≤ ∫⋯∫⁻_t, g ∂μ
state_after: δ : Type u_1
δ' : Type u_2
π : δ → Type u_3
inst✝² : (x : δ) → MeasurableSpace (π x)
μ : (i : δ) → Measure (π i)
inst✝¹ : ∀ (i : δ), SigmaFinite (μ i)
inst✝ : DecidableEq δ
s t : Finset δ
f✝ g✝ : ((i : δ) → π i) → ℝ≥0∞
x y : (i : δ) → π i
i : δ
f g : ((i : δ) → π i) → ℝ≥0∞
hst : s ⊆ t
hf : Measurable f
hg : Measurable g
hfg : ∫⋯∫⁻_s, f ∂μ ≤ ∫⋯∫⁻_s, g ∂μ
⊢ ∫⋯∫⁻_t \ s, ∫⋯∫⁻_s, f ∂μ ∂μ ≤ ∫⋯∫⁻_t \ s, ∫⋯∫⁻_s, g ∂μ ∂μ

tactic: exact lmarginal_mono hfg
state_before: δ : Type u_1
δ' : Type u_2
π : δ → Type u_3
inst✝² : (x : δ) → MeasurableSpace (π x)
μ : (i : δ) → Measure (π i)
inst✝¹ : ∀ (i : δ), SigmaFinite (μ i)
inst✝ : DecidableEq δ
s t : Finset δ
f✝ g✝ : ((i : δ) → π i) → ℝ≥0∞
x y : (i : δ) → π i
i : δ
f g : ((i : δ) → π i) → ℝ≥0∞
hst : s ⊆ t
hf : Measurable f
hg : Measurable g
hfg : ∫⋯∫⁻_s, f ∂μ ≤ ∫⋯∫⁻_s, g ∂μ
⊢ ∫⋯∫⁻_t \ s, ∫⋯∫⁻_s, f ∂μ ∂μ ≤ ∫⋯∫⁻_t \ s, ∫⋯∫⁻_s, g ∂μ ∂μ
state_after: no goals
Theorem: Matrix.Fin.circulant_injective
File: Mathlib/LinearAlgebra/Matrix/Circulant.lean

tactic: simp [Injective]
state_before: α : Type u_1
β : Type u_2
m : Type u_3
n : Type u_4
R : Type u_5
⊢ Injective fun v => circulant v
state_after: no goals
Theorem: Equiv.Perm.sumCongr_swap_refl
File: Mathlib/Logic/Equiv/Basic.lean

tactic: ext x
state_before: α✝ : Sort ?u.99017
inst✝² : DecidableEq α✝
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
i j : α
⊢ (swap i j).sumCongr (Equiv.refl β) = swap (Sum.inl i) (Sum.inl j)
state_after: case H
α✝ : Sort ?u.99017
inst✝² : DecidableEq α✝
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
i j : α
x : α ⊕ β
⊢ ((swap i j).sumCongr (Equiv.refl β)) x = (swap (Sum.inl i) (Sum.inl j)) x

tactic: cases x
state_before: case H
α✝ : Sort ?u.99017
inst✝² : DecidableEq α✝
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
i j : α
x : α ⊕ β
⊢ ((swap i j).sumCongr (Equiv.refl β)) x = (swap (Sum.inl i) (Sum.inl j)) x
state_after: case H.inl
α✝ : Sort ?u.99017
inst✝² : DecidableEq α✝
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
i j val✝ : α
⊢ ((swap i j).sumCongr (Equiv.refl β)) (Sum.inl val✝) = (swap (Sum.inl i) (Sum.inl j)) (Sum.inl val✝)

case H.inr
α✝ : Sort ?u.99017
inst✝² : DecidableEq α✝
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
i j : α
val✝ : β
⊢ ((swap i j).sumCongr (Equiv.refl β)) (Sum.inr val✝) = (swap (Sum.inl i) (Sum.inl j)) (Sum.inr val✝)

tactic: simp only [Equiv.sumCongr_apply, Sum.map, coe_refl, comp_id, Sum.elim_inl, comp_apply,
  swap_apply_def, Sum.inl.injEq]
state_before: case H.inl
α✝ : Sort ?u.99017
inst✝² : DecidableEq α✝
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
i j val✝ : α
⊢ ((swap i j).sumCongr (Equiv.refl β)) (Sum.inl val✝) = (swap (Sum.inl i) (Sum.inl j)) (Sum.inl val✝)
state_after: case H.inl
α✝ : Sort ?u.99017
inst✝² : DecidableEq α✝
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
i j val✝ : α
⊢ Sum.inl (if val✝ = i then j else if val✝ = j then i else val✝) =
    if val✝ = i then Sum.inl j else if val✝ = j then Sum.inl i else Sum.inl val✝

tactic: split_ifs <;> rfl
state_before: case H.inl
α✝ : Sort ?u.99017
inst✝² : DecidableEq α✝
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
i j val✝ : α
⊢ Sum.inl (if val✝ = i then j else if val✝ = j then i else val✝) =
    if val✝ = i then Sum.inl j else if val✝ = j then Sum.inl i else Sum.inl val✝
state_after: no goals

tactic: simp [Sum.map, swap_apply_of_ne_of_ne]
state_before: case H.inr
α✝ : Sort ?u.99017
inst✝² : DecidableEq α✝
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
i j : α
val✝ : β
⊢ ((swap i j).sumCongr (Equiv.refl β)) (Sum.inr val✝) = (swap (Sum.inl i) (Sum.inl j)) (Sum.inr val✝)
state_after: no goals
Theorem: SimpleGraph.Walk.reverse_copy
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: subst_vars
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u' v' : V
p : G.Walk u v
hu : u = u'
hv : v = v'
⊢ (p.copy hu hv).reverse = p.reverse.copy hv hu
state_after: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u' v' : V
p : G.Walk u' v'
⊢ (p.copy ⋯ ⋯).reverse = p.reverse.copy ⋯ ⋯

tactic: rfl
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u' v' : V
p : G.Walk u' v'
⊢ (p.copy ⋯ ⋯).reverse = p.reverse.copy ⋯ ⋯
state_after: no goals
Theorem: wbtw_smul_vadd_smul_vadd_of_nonneg_of_nonpos
File: Mathlib/Analysis/Convex/Between.lean

tactic: rw [wbtw_comm]
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝³ : LinearOrderedField R
inst✝² : AddCommGroup V
inst✝¹ : Module R V
inst✝ : AddTorsor V P
x : P
v : V
r₁ r₂ : R
hr₁ : 0 ≤ r₁
hr₂ : r₂ ≤ 0
⊢ Wbtw R (r₁ • v +ᵥ x) x (r₂ • v +ᵥ x)
state_after: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝³ : LinearOrderedField R
inst✝² : AddCommGroup V
inst✝¹ : Module R V
inst✝ : AddTorsor V P
x : P
v : V
r₁ r₂ : R
hr₁ : 0 ≤ r₁
hr₂ : r₂ ≤ 0
⊢ Wbtw R (r₂ • v +ᵥ x) x (r₁ • v +ᵥ x)

tactic: exact wbtw_smul_vadd_smul_vadd_of_nonpos_of_nonneg x v hr₂ hr₁
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝³ : LinearOrderedField R
inst✝² : AddCommGroup V
inst✝¹ : Module R V
inst✝ : AddTorsor V P
x : P
v : V
r₁ r₂ : R
hr₁ : 0 ≤ r₁
hr₂ : r₂ ≤ 0
⊢ Wbtw R (r₂ • v +ᵥ x) x (r₁ • v +ᵥ x)
state_after: no goals
Theorem: Batteries.RBNode.forM_eq_forM_toList
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: induction t <;> simp [*]
state_before: m : Type u_1 → Type u_2
α : Type u_3
f : α → m PUnit
inst✝¹ : Monad m
inst✝ : LawfulMonad m
t : RBNode α
⊢ forM f t = t.toList.forM f
state_after: no goals
Theorem: WeierstrassCurve.Jacobian.polynomialX_eq
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

tactic: rw [polynomialX, polynomial]
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
⊢ W'.polynomialX = C W'.a₁ * X y * X z - (C 3 * X x ^ 2 + C (2 * W'.a₂) * X x * X z ^ 2 + C W'.a₄ * X z ^ 4)
state_after: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
⊢ (pderiv x)
      (X y ^ 2 + C W'.a₁ * X x * X y * X z + C W'.a₃ * X y * X z ^ 3 -
        (X x ^ 3 + C W'.a₂ * X x ^ 2 * X z ^ 2 + C W'.a₄ * X x * X z ^ 4 + C W'.a₆ * X z ^ 6)) =
    C W'.a₁ * X y * X z - (C 3 * X x ^ 2 + C (2 * W'.a₂) * X x * X z ^ 2 + C W'.a₄ * X z ^ 4)

tactic: pderiv_simp
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
⊢ (pderiv x)
      (X y ^ 2 + C W'.a₁ * X x * X y * X z + C W'.a₃ * X y * X z ^ 3 -
        (X x ^ 3 + C W'.a₂ * X x ^ 2 * X z ^ 2 + C W'.a₄ * X x * X z ^ 4 + C W'.a₆ * X z ^ 6)) =
    C W'.a₁ * X y * X z - (C 3 * X x ^ 2 + C (2 * W'.a₂) * X x * X z ^ 2 + C W'.a₄ * X z ^ 4)
state_after: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
⊢ ↑2 * X y ^ (2 - 1) * 0 + (((0 * X x + C W'.a₁ * 1) * X y + C W'.a₁ * X x * 0) * X z + C W'.a₁ * X x * X y * 0) +
        ((0 * X y + C W'.a₃ * 0) * X z ^ 3 + C W'.a₃ * X y * (↑3 * X z ^ (3 - 1) * 0)) -
      (↑3 * X x ^ (3 - 1) * 1 +
            ((0 * X x ^ 2 + C W'.a₂ * (↑2 * X x ^ (2 - 1) * 1)) * X z ^ 2 +
              C W'.a₂ * X x ^ 2 * (↑2 * X z ^ (2 - 1) * 0)) +
          ((0 * X x + C W'.a₄ * 1) * X z ^ 4 + C W'.a₄ * X x * (↑4 * X z ^ (4 - 1) * 0)) +
        (0 * X z ^ 6 + C W'.a₆ * (↑6 * X z ^ (6 - 1) * 0))) =
    C W'.a₁ * X y * X z - (3 * X x ^ 2 + 2 * C W'.a₂ * X x * X z ^ 2 + C W'.a₄ * X z ^ 4)

tactic: ring1
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
⊢ ↑2 * X y ^ (2 - 1) * 0 + (((0 * X x + C W'.a₁ * 1) * X y + C W'.a₁ * X x * 0) * X z + C W'.a₁ * X x * X y * 0) +
        ((0 * X y + C W'.a₃ * 0) * X z ^ 3 + C W'.a₃ * X y * (↑3 * X z ^ (3 - 1) * 0)) -
      (↑3 * X x ^ (3 - 1) * 1 +
            ((0 * X x ^ 2 + C W'.a₂ * (↑2 * X x ^ (2 - 1) * 1)) * X z ^ 2 +
              C W'.a₂ * X x ^ 2 * (↑2 * X z ^ (2 - 1) * 0)) +
          ((0 * X x + C W'.a₄ * 1) * X z ^ 4 + C W'.a₄ * X x * (↑4 * X z ^ (4 - 1) * 0)) +
        (0 * X z ^ 6 + C W'.a₆ * (↑6 * X z ^ (6 - 1) * 0))) =
    C W'.a₁ * X y * X z - (3 * X x ^ 2 + 2 * C W'.a₂ * X x * X z ^ 2 + C W'.a₄ * X z ^ 4)
state_after: no goals
Theorem: DiscreteValuationRing.addVal_def
File: Mathlib/RingTheory/DiscreteValuationRing/Basic.lean

tactic: rw [addVal, addValuation_apply, hr, eq_of_associated_left
    (associated_of_irreducible R hϖ (Classical.choose_spec (exists_prime R)).irreducible),
  eq_of_associated_right (Associated.symm ⟨u, mul_comm _ _⟩),
  multiplicity_pow_self_of_prime (irreducible_iff_prime.1 hϖ)]
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : DiscreteValuationRing R
r : R
u : Rˣ
ϖ : R
hϖ : Irreducible ϖ
n : ℕ
hr : r = ↑u * ϖ ^ n
⊢ (addVal R) r = ↑n
state_after: no goals
Theorem: SimpleGraph.three_le_girth
File: Mathlib/Combinatorics/SimpleGraph/Girth.lean

tactic: by_cases h : G.IsAcyclic
state_before: α : Type u_1
G : SimpleGraph α
n : ℕ∞
⊢ 3 ≤ G.girth
state_after: case pos
α : Type u_1
G : SimpleGraph α
n : ℕ∞
h : G.IsAcyclic
⊢ 3 ≤ G.girth

case neg
α : Type u_1
G : SimpleGraph α
n : ℕ∞
h : ¬G.IsAcyclic
⊢ 3 ≤ G.girth

tactic: rw [← girth_eq_top] at h
state_before: case pos
α : Type u_1
G : SimpleGraph α
n : ℕ∞
h : G.IsAcyclic
⊢ 3 ≤ G.girth
state_after: case pos
α : Type u_1
G : SimpleGraph α
n : ℕ∞
h : G.girth = ⊤
⊢ 3 ≤ G.girth

tactic: rw [h]
state_before: case pos
α : Type u_1
G : SimpleGraph α
n : ℕ∞
h : G.girth = ⊤
⊢ 3 ≤ G.girth
state_after: case pos
α : Type u_1
G : SimpleGraph α
n : ℕ∞
h : G.girth = ⊤
⊢ 3 ≤ ⊤

tactic: apply le_top
state_before: case pos
α : Type u_1
G : SimpleGraph α
n : ℕ∞
h : G.girth = ⊤
⊢ 3 ≤ ⊤
state_after: no goals

tactic: rw [← exists_girth_eq_length] at h
state_before: case neg
α : Type u_1
G : SimpleGraph α
n : ℕ∞
h : ¬G.IsAcyclic
⊢ 3 ≤ G.girth
state_after: case neg
α : Type u_1
G : SimpleGraph α
n : ℕ∞
h : ∃ a w, w.IsCycle ∧ G.girth = ↑w.length
⊢ 3 ≤ G.girth

tactic: have ⟨_, _, _⟩ := h
state_before: case neg
α : Type u_1
G : SimpleGraph α
n : ℕ∞
h : ∃ a w, w.IsCycle ∧ G.girth = ↑w.length
⊢ 3 ≤ G.girth
state_after: case neg
α : Type u_1
G : SimpleGraph α
n : ℕ∞
h : ∃ a w, w.IsCycle ∧ G.girth = ↑w.length
w✝¹ : α
w✝ : G.Walk w✝¹ w✝¹
h✝ : w✝.IsCycle ∧ G.girth = ↑w✝.length
⊢ 3 ≤ G.girth

tactic: simp_all only [Nat.cast_inj, Nat.ofNat_le_cast, Walk.IsCycle.three_le_length]
state_before: case neg
α : Type u_1
G : SimpleGraph α
n : ℕ∞
h : ∃ a w, w.IsCycle ∧ G.girth = ↑w.length
w✝¹ : α
w✝ : G.Walk w✝¹ w✝¹
h✝ : w✝.IsCycle ∧ G.girth = ↑w✝.length
⊢ 3 ≤ G.girth
state_after: no goals
Theorem: Multiset.prod_toEnumFinset
File: Mathlib/Data/Multiset/Fintype.lean

tactic: rw [Fintype.prod_equiv m.coeEquiv (fun x ↦ f x x.2) fun x ↦ f x.1.1 x.1.2]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
β : Type u_2
inst✝ : CommMonoid β
m : Multiset α
f : α → ℕ → β
⊢ ∏ x ∈ m.toEnumFinset, f x.1 x.2 = ∏ x : m.ToType, f x.fst ↑x.snd
state_after: α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
β : Type u_2
inst✝ : CommMonoid β
m : Multiset α
f : α → ℕ → β
⊢ ∏ x ∈ m.toEnumFinset, f x.1 x.2 = ∏ x : { x // x ∈ m.toEnumFinset }, f (↑x).1 (↑x).2

α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
β : Type u_2
inst✝ : CommMonoid β
m : Multiset α
f : α → ℕ → β
⊢ ∀ (x : m.ToType), f x.fst ↑x.snd = f (↑(m.coeEquiv x)).1 (↑(m.coeEquiv x)).2

tactic: rw [← m.toEnumFinset.prod_coe_sort fun x ↦ f x.1 x.2]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
β : Type u_2
inst✝ : CommMonoid β
m : Multiset α
f : α → ℕ → β
⊢ ∏ x ∈ m.toEnumFinset, f x.1 x.2 = ∏ x : { x // x ∈ m.toEnumFinset }, f (↑x).1 (↑x).2
state_after: no goals

tactic: intro x
state_before: α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
β : Type u_2
inst✝ : CommMonoid β
m : Multiset α
f : α → ℕ → β
⊢ ∀ (x : m.ToType), f x.fst ↑x.snd = f (↑(m.coeEquiv x)).1 (↑(m.coeEquiv x)).2
state_after: α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
β : Type u_2
inst✝ : CommMonoid β
m : Multiset α
f : α → ℕ → β
x : m.ToType
⊢ f x.fst ↑x.snd = f (↑(m.coeEquiv x)).1 (↑(m.coeEquiv x)).2

tactic: rfl
state_before: α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
β : Type u_2
inst✝ : CommMonoid β
m : Multiset α
f : α → ℕ → β
x : m.ToType
⊢ f x.fst ↑x.snd = f (↑(m.coeEquiv x)).1 (↑(m.coeEquiv x)).2
state_after: no goals
Theorem: Polynomial.mem_nthRootsFinset
File: Mathlib/Algebra/Polynomial/Roots.lean

tactic: classical
rw [nthRootsFinset_def, mem_toFinset, mem_nthRoots h]
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]
n : ℕ
h : 0 < n
x : R
⊢ x ∈ nthRootsFinset n R ↔ x ^ n = 1
state_after: no goals

tactic: rw [nthRootsFinset_def, mem_toFinset, mem_nthRoots h]
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]
n : ℕ
h : 0 < n
x : R
⊢ x ∈ nthRootsFinset n R ↔ x ^ n = 1
state_after: no goals
Theorem: Set.mk_preimage_sigma_fn_eq_if
File: Mathlib/Data/Set/Sigma.lean

tactic: split_ifs <;> simp [*]
state_before: ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
β✝³ : ι → Type u_4
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
u : Set ((i : ι) × α i)
x : (i : ι) × α i
i j : ι
a : α i
β✝² : Type u_5
inst✝¹ : CompleteLattice β✝²
β✝¹ : Type u_6
β✝ : ι → Type u_7
β : Type u_8
inst✝ : DecidablePred fun x => x ∈ s
g : β → α i
x✝ : β
⊢ x✝ ∈ (fun b => ⟨i, g b⟩) ⁻¹' s.sigma t ↔ x✝ ∈ if i ∈ s then g ⁻¹' t i else ∅
state_after: no goals
Theorem: int_smul_eq_zsmul
File: Mathlib/Algebra/Module/Defs.lean

tactic: rfl
state_before: α : Type u_1
R : Type u_2
k : Type u_3
S : Type u_4
M : Type u_5
M₂ : Type u_6
M₃ : Type u_7
ι : Type u_8
inst✝⁴ : Semiring S
inst✝³ : Ring R
inst✝² : AddCommGroup M
inst✝¹ : Module S M
inst✝ : Module R M
h : Module ℤ M
n : ℤ
x : M
⊢ SMul.smul n x = n • x
state_after: no goals
Theorem: List.countP_map
File: .lake/packages/batteries/Batteries/Data/List/Count.lean

tactic: rw [map_cons, countP_cons, countP_cons, countP_map p f l]
state_before: α : Type u_2
p✝ q : α → Bool
β : Type u_1
p : β → Bool
f : α → β
a : α
l : List α
⊢ countP p (map f (a :: l)) = countP (p ∘ f) (a :: l)
state_after: α : Type u_2
p✝ q : α → Bool
β : Type u_1
p : β → Bool
f : α → β
a : α
l : List α
⊢ (countP (p ∘ f) l + if p (f a) = true then 1 else 0) = countP (p ∘ f) l + if (p ∘ f) a = true then 1 else 0

tactic: rfl
state_before: α : Type u_2
p✝ q : α → Bool
β : Type u_1
p : β → Bool
f : α → β
a : α
l : List α
⊢ (countP (p ∘ f) l + if p (f a) = true then 1 else 0) = countP (p ∘ f) l + if (p ∘ f) a = true then 1 else 0
state_after: no goals
Theorem: SetTheory.PGame.lf_or_equiv_or_gf
File: Mathlib/SetTheory/Game/PGame.lean

tactic: by_cases h : x ⧏ y
state_before: xl xr : Type u
x y : PGame
⊢ x ⧏ y ∨ x ≈ y ∨ y ⧏ x
state_after: case pos
xl xr : Type u
x y : PGame
h : x ⧏ y
⊢ x ⧏ y ∨ x ≈ y ∨ y ⧏ x

case neg
xl xr : Type u
x y : PGame
h : ¬x ⧏ y
⊢ x ⧏ y ∨ x ≈ y ∨ y ⧏ x

tactic: exact Or.inl h
state_before: case pos
xl xr : Type u
x y : PGame
h : x ⧏ y
⊢ x ⧏ y ∨ x ≈ y ∨ y ⧏ x
state_after: no goals

tactic: right
state_before: case neg
xl xr : Type u
x y : PGame
h : ¬x ⧏ y
⊢ x ⧏ y ∨ x ≈ y ∨ y ⧏ x
state_after: case neg.h
xl xr : Type u
x y : PGame
h : ¬x ⧏ y
⊢ x ≈ y ∨ y ⧏ x

tactic: cases' lt_or_equiv_of_le (PGame.not_lf.1 h) with h' h'
state_before: case neg.h
xl xr : Type u
x y : PGame
h : ¬x ⧏ y
⊢ x ≈ y ∨ y ⧏ x
state_after: case neg.h.inl
xl xr : Type u
x y : PGame
h : ¬x ⧏ y
h' : y < x
⊢ x ≈ y ∨ y ⧏ x

case neg.h.inr
xl xr : Type u
x y : PGame
h : ¬x ⧏ y
h' : y ≈ x
⊢ x ≈ y ∨ y ⧏ x

tactic: exact Or.inr h'.lf
state_before: case neg.h.inl
xl xr : Type u
x y : PGame
h : ¬x ⧏ y
h' : y < x
⊢ x ≈ y ∨ y ⧏ x
state_after: no goals

tactic: exact Or.inl (Equiv.symm h')
state_before: case neg.h.inr
xl xr : Type u
x y : PGame
h : ¬x ⧏ y
h' : y ≈ x
⊢ x ≈ y ∨ y ⧏ x
state_after: no goals
Theorem: Cardinal.mk_compl_finset_of_infinite
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: apply mk_compl_of_infinite
state_before: α : Type u_1
inst✝ : Infinite α
s : Finset α
⊢ #↑(↑s)ᶜ = #α
state_after: case h2
α : Type u_1
inst✝ : Infinite α
s : Finset α
⊢ #↑↑s < #α

tactic: exact (finset_card_lt_aleph0 s).trans_le (aleph0_le_mk α)
state_before: case h2
α : Type u_1
inst✝ : Infinite α
s : Finset α
⊢ #↑↑s < #α
state_after: no goals
Theorem: mul_neg_geom_sum
File: Mathlib/Algebra/GeomSum.lean

tactic: simpa using geom_sum_mul_neg (op x) n
state_before: α : Type u
inst✝ : Ring α
x : α
n : ℕ
⊢ op ((1 - x) * ∑ i ∈ range n, x ^ i) = op (1 - x ^ n)
state_after: no goals
Theorem: CategoryTheory.Limits.map_lift_equalizerComparison
File: Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean

tactic: simp only [← G.map_comp, w]
state_before: C : Type u
inst✝³ : Category.{v, u} C
X Y : C
f g : X ⟶ Y
D : Type u₂
inst✝² : Category.{v₂, u₂} D
G : C ⥤ D
inst✝¹ : HasEqualizer f g
inst✝ : HasEqualizer (G.map f) (G.map g)
Z : C
h : Z ⟶ X
w : h ≫ f = h ≫ g
⊢ G.map h ≫ G.map f = G.map h ≫ G.map g
state_after: no goals

tactic: apply equalizer.hom_ext
state_before: C : Type u
inst✝³ : Category.{v, u} C
X Y : C
f g : X ⟶ Y
D : Type u₂
inst✝² : Category.{v₂, u₂} D
G : C ⥤ D
inst✝¹ : HasEqualizer f g
inst✝ : HasEqualizer (G.map f) (G.map g)
Z : C
h : Z ⟶ X
w : h ≫ f = h ≫ g
⊢ G.map (equalizer.lift h w) ≫ equalizerComparison f g G = equalizer.lift (G.map h) ⋯
state_after: case h
C : Type u
inst✝³ : Category.{v, u} C
X Y : C
f g : X ⟶ Y
D : Type u₂
inst✝² : Category.{v₂, u₂} D
G : C ⥤ D
inst✝¹ : HasEqualizer f g
inst✝ : HasEqualizer (G.map f) (G.map g)
Z : C
h : Z ⟶ X
w : h ≫ f = h ≫ g
⊢ (G.map (equalizer.lift h w) ≫ equalizerComparison f g G) ≫ equalizer.ι (G.map f) (G.map g) =
    equalizer.lift (G.map h) ⋯ ≫ equalizer.ι (G.map f) (G.map g)

tactic: simp [← G.map_comp]
state_before: case h
C : Type u
inst✝³ : Category.{v, u} C
X Y : C
f g : X ⟶ Y
D : Type u₂
inst✝² : Category.{v₂, u₂} D
G : C ⥤ D
inst✝¹ : HasEqualizer f g
inst✝ : HasEqualizer (G.map f) (G.map g)
Z : C
h : Z ⟶ X
w : h ≫ f = h ≫ g
⊢ (G.map (equalizer.lift h w) ≫ equalizerComparison f g G) ≫ equalizer.ι (G.map f) (G.map g) =
    equalizer.lift (G.map h) ⋯ ≫ equalizer.ι (G.map f) (G.map g)
state_after: no goals
Theorem: gauge_lt_one_eq_self_of_isOpen
File: Mathlib/Analysis/Convex/Gauge.lean

tactic: refine (gauge_lt_one_subset_self hs₁ ‹_› <| absorbent_nhds_zero <| hs₂.mem_nhds hs₀).antisymm ?_
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
s t : Set E
x : E
a : ℝ
inst✝¹ : TopologicalSpace E
inst✝ : ContinuousSMul ℝ E
hs₁ : Convex ℝ s
hs₀ : 0 ∈ s
hs₂ : IsOpen s
⊢ {x | gauge s x < 1} = s
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
s t : Set E
x : E
a : ℝ
inst✝¹ : TopologicalSpace E
inst✝ : ContinuousSMul ℝ E
hs₁ : Convex ℝ s
hs₀ : 0 ∈ s
hs₂ : IsOpen s
⊢ s ⊆ {x | gauge s x < 1}

tactic: convert interior_subset_gauge_lt_one s
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
s t : Set E
x : E
a : ℝ
inst✝¹ : TopologicalSpace E
inst✝ : ContinuousSMul ℝ E
hs₁ : Convex ℝ s
hs₀ : 0 ∈ s
hs₂ : IsOpen s
⊢ s ⊆ {x | gauge s x < 1}
state_after: case h.e'_3
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
s t : Set E
x : E
a : ℝ
inst✝¹ : TopologicalSpace E
inst✝ : ContinuousSMul ℝ E
hs₁ : Convex ℝ s
hs₀ : 0 ∈ s
hs₂ : IsOpen s
⊢ s = interior s

tactic: exact hs₂.interior_eq.symm
state_before: case h.e'_3
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
s t : Set E
x : E
a : ℝ
inst✝¹ : TopologicalSpace E
inst✝ : ContinuousSMul ℝ E
hs₁ : Convex ℝ s
hs₀ : 0 ∈ s
hs₂ : IsOpen s
⊢ s = interior s
state_after: no goals
Theorem: Finset.prod_powerset
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: rw [powerset_card_disjiUnion, prod_disjiUnion]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : Finset α → β
⊢ ∏ t ∈ s.powerset, f t = ∏ j ∈ range (s.card + 1), ∏ t ∈ powersetCard j s, f t
state_after: no goals
Theorem: WeierstrassCurve.Jacobian.negMap_of_Z_eq_zero
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

tactic: rw [negMap_eq, neg_of_Z_eq_zero hP hPz,
  smul_eq _ ((isUnit_Y_of_Z_eq_zero hP hPz).div <| isUnit_X_of_Z_eq_zero hP hPz).neg]
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
hP : W.Nonsingular P
hPz : P z = 0
⊢ W.negMap ⟦P⟧ = ⟦![1, 1, 0]⟧
state_after: no goals
Theorem: MeasureTheory.Measure.restrict_restrict₀
File: Mathlib/MeasureTheory/Measure/Restrict.lean

tactic: simp only [Set.inter_assoc, restrict_apply hu,
  restrict_apply₀ (hu.nullMeasurableSet.inter hs)]
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
hs : NullMeasurableSet s (μ.restrict t)
u : Set α
hu : MeasurableSet u
⊢ ((μ.restrict t).restrict s) u = (μ.restrict (s ∩ t)) u
state_after: no goals
Theorem: Finsupp.mem_supported_support
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: rw [Finsupp.mem_supported]
state_before: α : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
R : Type u_5
S : Type u_6
inst✝⁷ : Semiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
p : α →₀ M
⊢ p ∈ supported M R ↑p.support
state_after: no goals
Theorem: Real.Angle.cos_sq_add_sin_sq
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: induction θ using Real.Angle.induction_on
state_before: θ : Angle
⊢ θ.cos ^ 2 + θ.sin ^ 2 = 1
state_after: case h
x✝ : ℝ
⊢ (↑x✝).cos ^ 2 + (↑x✝).sin ^ 2 = 1

tactic: exact Real.cos_sq_add_sin_sq _
state_before: case h
x✝ : ℝ
⊢ (↑x✝).cos ^ 2 + (↑x✝).sin ^ 2 = 1
state_after: no goals
Theorem: Quaternion.im_sq
File: Mathlib/Algebra/Quaternion.lean

tactic: simp_rw [sq, ← star_mul_self, im_star, neg_mul, neg_neg]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
r x y z : R
a b c : ℍ[R]
⊢ a.im ^ 2 = -↑(normSq a.im)
state_after: no goals
Theorem: spectrum.scalar_eq
File: Mathlib/Algebra/Algebra/Spectrum.lean

tactic: rw [← add_zero (↑ₐ k), ← singleton_add_eq, zero_eq, Set.singleton_add_singleton, add_zero]
state_before: 𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : Nontrivial A
k : 𝕜
⊢ σ (↑ₐ k) = {k}
state_after: no goals