tasksource/leandojo huggingface dataset:
Theorem: CategoryTheory.Limits.CompleteLattice.finite_product_eq_finset_inf
File: Mathlib/CategoryTheory/Limits/Lattice.lean

tactic: trans
state_before: α : Type u
J : Type w
inst✝⁴ : SmallCategory J
inst✝³ : FinCategory J
inst✝² : SemilatticeInf α
inst✝¹ : OrderTop α
ι : Type u
inst✝ : Fintype ι
f : ι → α
⊢ (∏ f) = Finset.inf Fintype.elems f

tactic: exact
  (IsLimit.conePointUniqueUpToIso (limit.isLimit _)
      (finiteLimitCone (Discrete.functor f)).isLimit).to_eq
state_before: α : Type u
J : Type w
inst✝⁴ : SmallCategory J
inst✝³ : FinCategory J
inst✝² : SemilatticeInf α
inst✝¹ : OrderTop α
ι : Type u
inst✝ : Fintype ι
f : ι → α
⊢ (∏ f) = ?m.26818

α : Type u
J : Type w
inst✝⁴ : SmallCategory J
inst✝³ : FinCategory J
inst✝² : SemilatticeInf α
inst✝¹ : OrderTop α
ι : Type u
inst✝ : Fintype ι
f : ι → α
⊢ ?m.26818 = Finset.inf Fintype.elems f

α : Type u
J : Type w
inst✝⁴ : SmallCategory J
inst✝³ : FinCategory J
inst✝² : SemilatticeInf α
inst✝¹ : OrderTop α
ι : Type u
inst✝ : Fintype ι
f : ι → α
⊢ α

tactic: change Finset.univ.inf (f ∘ discreteEquiv.toEmbedding) = Fintype.elems.inf f
state_before: α : Type u
J : Type w
inst✝⁴ : SmallCategory J
inst✝³ : FinCategory J
inst✝² : SemilatticeInf α
inst✝¹ : OrderTop α
ι : Type u
inst✝ : Fintype ι
f : ι → α
⊢ (finiteLimitCone (Discrete.functor f)).cone.pt = Finset.inf Fintype.elems f

tactic: simp only [← Finset.inf_map, Finset.univ_map_equiv_to_embedding]
state_before: α : Type u
J : Type w
inst✝⁴ : SmallCategory J
inst✝³ : FinCategory J
inst✝² : SemilatticeInf α
inst✝¹ : OrderTop α
ι : Type u
inst✝ : Fintype ι
f : ι → α
⊢ Finset.inf Finset.univ (f ∘ ↑(Equiv.toEmbedding discreteEquiv)) = Finset.inf Fintype.elems f

tactic: rfl
state_before: α : Type u
J : Type w
inst✝⁴ : SmallCategory J
inst✝³ : FinCategory J
inst✝² : SemilatticeInf α
inst✝¹ : OrderTop α
ι : Type u
inst✝ : Fintype ι
f : ι → α
⊢ Finset.inf Finset.univ f = Finset.inf Fintype.elems f
Theorem: SimpleGraph.fromEdgeSet_sdiff
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: ext (v w)
state_before: ι : Sort ?u.86958
𝕜 : Type ?u.86961
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e : Sym2 V
s✝ s t : Set (Sym2 V)
⊢ fromEdgeSet s \ fromEdgeSet t = fromEdgeSet (s \ t)

tactic: constructor <;> simp (config := { contextual := true })
state_before: case Adj.h.h.a
ι : Sort ?u.86958
𝕜 : Type ?u.86961
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v✝ w✝ : V
e : Sym2 V
s✝ s t : Set (Sym2 V)
v w : V
⊢ Adj (fromEdgeSet s \ fromEdgeSet t) v w ↔ Adj (fromEdgeSet (s \ t)) v w
Theorem: Nat.lt_of_add_lt_add_right
File: Std/Data/Nat/Lemmas.lean

tactic: rwa [Nat.add_comm b a, Nat.add_comm b c]
state_before: a b c : Nat
h : a + b < c + b
⊢ b + a < b + c
Theorem: Finsupp.card_Ico
File: Mathlib/Data/Finsupp/Interval.lean

tactic: rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
state_before: ι : Type u_1
α : Type u_2
inst✝² : PartialOrder α
inst✝¹ : Zero α
inst✝ : LocallyFiniteOrder α
f g : ι →₀ α
⊢ card (Ico f g) = ∏ i in f.support ∪ g.support, card (Icc (↑f i) (↑g i)) - 1
Theorem: FirstOrder.Language.Structure.cg_iff
File: Mathlib/ModelTheory/FinitelyGenerated.lean

tactic: rw [cg_def, Substructure.cg_def]
state_before: L : Language
M : Type u_3
inst✝ : Structure L M
⊢ CG L M ↔ ∃ S, Set.Countable S ∧ LowerAdjoint.toFun (closure L) S = ⊤
Theorem: isPreconnected_sUnion
File: Mathlib/Topology/Connected.lean

tactic: apply isPreconnected_of_forall x
state_before: α : Type u
β : Type v
ι : Type ?u.2906
π : ι → Type ?u.2911
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
c : Set (Set α)
H1 : ∀ (s : Set α), s ∈ c → x ∈ s
H2 : ∀ (s : Set α), s ∈ c → IsPreconnected s
⊢ IsPreconnected (⋃₀ c)

tactic: rintro y ⟨s, sc, ys⟩
state_before: α : Type u
β : Type v
ι : Type ?u.2906
π : ι → Type ?u.2911
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
c : Set (Set α)
H1 : ∀ (s : Set α), s ∈ c → x ∈ s
H2 : ∀ (s : Set α), s ∈ c → IsPreconnected s
⊢ ∀ (y : α), y ∈ ⋃₀ c → ∃ t, t ⊆ ⋃₀ c ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t

tactic: exact ⟨s, subset_sUnion_of_mem sc, H1 s sc, ys, H2 s sc⟩
state_before: case intro.intro
α : Type u
β : Type v
ι : Type ?u.2906
π : ι → Type ?u.2911
inst✝ : TopologicalSpace α
s✝ t u v : Set α
x : α
c : Set (Set α)
H1 : ∀ (s : Set α), s ∈ c → x ∈ s
H2 : ∀ (s : Set α), s ∈ c → IsPreconnected s
y : α
s : Set α
sc : s ∈ c
ys : y ∈ s
⊢ ∃ t, t ⊆ ⋃₀ c ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t
Theorem: Part.sdiff_mem_sdiff
File: Mathlib/Data/Part.lean

tactic: simp [sdiff_def]
state_before: α : Type u_1
β : Type ?u.95752
γ : Type ?u.95755
inst✝ : SDiff α
a b : Part α
ma mb : α
ha : ma ∈ a
hb : mb ∈ b
⊢ ma \ mb ∈ a \ b

tactic: aesop
state_before: α : Type u_1
β : Type ?u.95752
γ : Type ?u.95755
inst✝ : SDiff α
a b : Part α
ma mb : α
ha : ma ∈ a
hb : mb ∈ b
⊢ ∃ a_1, a_1 ∈ a ∧ ∃ a, a ∈ b ∧ a_1 \ a = ma \ mb
Theorem: List.count_singleton
File: Mathlib/Data/List/Count.lean

tactic: rw [count_cons]
state_before: α : Type u_1
l : List α
inst✝ : DecidableEq α
a : α
⊢ count a [a] = 1

tactic: simp
state_before: α : Type u_1
l : List α
inst✝ : DecidableEq α
a : α
⊢ (if a = a then succ (count a []) else count a []) = 1
Theorem: NNReal.lt_inv_iff_mul_lt
File: Mathlib/Data/Real/NNReal.lean

tactic: rw [← mul_lt_mul_left (pos_iff_ne_zero.2 h), mul_inv_cancel h, mul_comm]
state_before: r p : ℝ≥0
h : p ≠ 0
⊢ r < p⁻¹ ↔ r * p < 1
Theorem: Multiset.prod_eq_foldr
File: Mathlib/Algebra/BigOperators/Multiset/Basic.lean

tactic: simp [mul_left_comm]
state_before: ι : Type ?u.1814
α : Type ?u.1817
β : Type ?u.1820
γ : Type ?u.1823
inst✝ : CommMonoid α
s✝ t : Multiset α
a : α
m : Multiset ι
f g : ι → α
s : Multiset α
x y z : α
⊢ (fun x x_1 => x * x_1) x ((fun x x_1 => x * x_1) y z) = (fun x x_1 => x * x_1) y ((fun x x_1 => x * x_1) x z)
Theorem: List.comp_traverse
File: Mathlib/Control/Traversable/Instances.lean

tactic: induction x <;> simp! [*, functor_norm] <;> rfl
state_before: F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : Applicative G
inst✝¹ : LawfulApplicative F
inst✝ : LawfulApplicative G
α : Type u_1
β γ : Type u
f : β → F γ
g : α → G β
x : List α
⊢ List.traverse (Comp.mk ∘ (fun x x_1 => x <$> x_1) f ∘ g) x = Comp.mk (List.traverse f <$> List.traverse g x)
Theorem: LocalizedModule.zero_smul'
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: induction' x using LocalizedModule.induction_on with m s
state_before: R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x : LocalizedModule S M
⊢ 0 • x = 0

tactic: rw [← Localization.mk_zero s, mk_smul_mk, zero_smul, zero_mk]
state_before: case h
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : M
s : { x // x ∈ S }
⊢ 0 • mk m s = 0
Theorem: map_le_nonZeroDivisors_of_injective
File: Mathlib/RingTheory/NonZeroDivisors.lean

tactic: cases subsingleton_or_nontrivial M
state_before: M : Type u_3
M' : Type u_1
M₁ : Type ?u.57271
R : Type ?u.57274
R' : Type ?u.57277
F : Type u_2
inst✝⁶ : MonoidWithZero M
inst✝⁵ : MonoidWithZero M'
inst✝⁴ : CommMonoidWithZero M₁
inst✝³ : Ring R
inst✝² : CommRing R'
inst✝¹ : NoZeroDivisors M'
inst✝ : MonoidWithZeroHomClass F M M'
f : F
hf : Function.Injective ↑f
S : Submonoid M
hS : S ≤ M⁰
⊢ Submonoid.map f S ≤ M'⁰

tactic: simp [Subsingleton.elim S ⊥]
state_before: case inl
M : Type u_3
M' : Type u_1
M₁ : Type ?u.57271
R : Type ?u.57274
R' : Type ?u.57277
F : Type u_2
inst✝⁶ : MonoidWithZero M
inst✝⁵ : MonoidWithZero M'
inst✝⁴ : CommMonoidWithZero M₁
inst✝³ : Ring R
inst✝² : CommRing R'
inst✝¹ : NoZeroDivisors M'
inst✝ : MonoidWithZeroHomClass F M M'
f : F
hf : Function.Injective ↑f
S : Submonoid M
hS : S ≤ M⁰
h✝ : Subsingleton M
⊢ Submonoid.map f S ≤ M'⁰

tactic: exact le_nonZeroDivisors_of_noZeroDivisors fun h ↦
  let ⟨x, hx, hx0⟩ := h
  zero_ne_one (hS (hf (hx0.trans (map_zero f).symm) ▸ hx : 0 ∈ S) 1 (mul_zero 1)).symm
state_before: case inr
M : Type u_3
M' : Type u_1
M₁ : Type ?u.57271
R : Type ?u.57274
R' : Type ?u.57277
F : Type u_2
inst✝⁶ : MonoidWithZero M
inst✝⁵ : MonoidWithZero M'
inst✝⁴ : CommMonoidWithZero M₁
inst✝³ : Ring R
inst✝² : CommRing R'
inst✝¹ : NoZeroDivisors M'
inst✝ : MonoidWithZeroHomClass F M M'
f : F
hf : Function.Injective ↑f
S : Submonoid M
hS : S ≤ M⁰
h✝ : Nontrivial M
⊢ Submonoid.map f S ≤ M'⁰
Theorem: frontier_closedBall'
File: Mathlib/Analysis/NormedSpace/Basic.lean

tactic: rw [frontier, closure_closedBall, interior_closedBall' x r, closedBall_diff_ball]
state_before: α : Type ?u.308974
β : Type ?u.308977
γ : Type ?u.308980
ι : Type ?u.308983
inst✝⁶ : NormedField α
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace α E
F : Type ?u.309076
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace α F
inst✝¹ : NormedSpace ℝ E
inst✝ : Nontrivial E
x : E
r : ℝ
⊢ frontier (closedBall x r) = sphere x r
Theorem: CategoryTheory.Functor.preimageIso_mapIso
File: Mathlib/CategoryTheory/Functor/FullyFaithful.lean

tactic: ext
state_before: C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
F : C ⥤ D
inst✝¹ : Full F
inst✝ : Faithful F
X Y Z : C
f : X ≅ Y
⊢ preimageIso F (F.mapIso f) = f

tactic: simp
state_before: case w
C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
F : C ⥤ D
inst✝¹ : Full F
inst✝ : Faithful F
X Y Z : C
f : X ≅ Y
⊢ (preimageIso F (F.mapIso f)).hom = f.hom
Theorem: MeasureTheory.JordanDecomposition.real_smul_negPart_neg
File: Mathlib/MeasureTheory/Decomposition/Jordan.lean

tactic: rw [real_smul_def, ← smul_posPart, if_neg (not_le.2 hr), neg_negPart]
state_before: α : Type u_1
β : Type ?u.15046
inst✝ : MeasurableSpace α
j : JordanDecomposition α
r : ℝ
hr : r < 0
⊢ (r • j).negPart = Real.toNNReal (-r) • j.posPart
Theorem: Fin.coeSucc_eq_succ
File: Mathlib/Data/Fin/Basic.lean

tactic: cases n
state_before: n m : ℕ
a : Fin n
⊢ ↑castSucc a + 1 = succ a

tactic: exact @finZeroElim (fun _ => _) a
state_before: case zero
m : ℕ
a : Fin zero
⊢ ↑castSucc a + 1 = succ a

tactic: simp [a.is_lt, eq_iff_veq, add_def, Nat.mod_eq_of_lt]
state_before: case succ
m n✝ : ℕ
a : Fin (Nat.succ n✝)
⊢ ↑castSucc a + 1 = succ a
Theorem: Tropical.add_eq_zero_iff
File: Mathlib/Algebra/Tropical/Basic.lean

tactic: rw [add_eq_iff]
state_before: R : Type u
inst✝ : LinearOrder R
a b : Tropical (WithTop R)
⊢ a + b = 0 ↔ a = 0 ∧ b = 0

tactic: constructor
state_before: R : Type u
inst✝ : LinearOrder R
a b : Tropical (WithTop R)
⊢ a = 0 ∧ a ≤ b ∨ b = 0 ∧ b ≤ a ↔ a = 0 ∧ b = 0

tactic: rintro (⟨rfl, h⟩ | ⟨rfl, h⟩)
state_before: case mp
R : Type u
inst✝ : LinearOrder R
a b : Tropical (WithTop R)
⊢ a = 0 ∧ a ≤ b ∨ b = 0 ∧ b ≤ a → a = 0 ∧ b = 0

tactic: exact ⟨rfl, le_antisymm (le_zero _) h⟩
state_before: case mp.inl.intro
R : Type u
inst✝ : LinearOrder R
b : Tropical (WithTop R)
h : 0 ≤ b
⊢ 0 = 0 ∧ b = 0

tactic: exact ⟨le_antisymm (le_zero _) h, rfl⟩
state_before: case mp.inr.intro
R : Type u
inst✝ : LinearOrder R
a : Tropical (WithTop R)
h : 0 ≤ a
⊢ a = 0 ∧ 0 = 0

tactic: rintro ⟨rfl, rfl⟩
state_before: case mpr
R : Type u
inst✝ : LinearOrder R
a b : Tropical (WithTop R)
⊢ a = 0 ∧ b = 0 → a = 0 ∧ a ≤ b ∨ b = 0 ∧ b ≤ a

tactic: simp
state_before: case mpr.intro
R : Type u
inst✝ : LinearOrder R
⊢ 0 = 0 ∧ 0 ≤ 0 ∨ 0 = 0 ∧ 0 ≤ 0
Theorem: Finset.image_add_left_Ioo
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: rw [← map_add_left_Ioo, map_eq_image]
state_before: ι : Type ?u.242100
α : Type u_1
inst✝³ : OrderedCancelAddCommMonoid α
inst✝² : ExistsAddOfLE α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
a b c : α
⊢ image ((fun x x_1 => x + x_1) c) (Ioo a b) = Ioo (c + a) (c + b)

tactic: rfl
state_before: ι : Type ?u.242100
α : Type u_1
inst✝³ : OrderedCancelAddCommMonoid α
inst✝² : ExistsAddOfLE α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
a b c : α
⊢ image ((fun x x_1 => x + x_1) c) (Ioo a b) = image (↑(addLeftEmbedding c)) (Ioo a b)
Theorem: Set.unbounded_le_inter_not_le
File: Mathlib/Order/Bounded.lean

tactic: rw [← not_bounded_iff, ← not_bounded_iff, not_iff_not]
state_before: α : Type u_1
r : α → α → Prop
s t : Set α
inst✝ : SemilatticeSup α
a : α
⊢ Unbounded (fun x x_1 => x ≤ x_1) (s ∩ {b | ¬b ≤ a}) ↔ Unbounded (fun x x_1 => x ≤ x_1) s

tactic: exact bounded_le_inter_not_le a
state_before: α : Type u_1
r : α → α → Prop
s t : Set α
inst✝ : SemilatticeSup α
a : α
⊢ Bounded (fun x x_1 => x ≤ x_1) (s ∩ {b | ¬b ≤ a}) ↔ Bounded (fun x x_1 => x ≤ x_1) s
Theorem: Nat.divisorsAntidiagonal_zero
File: Mathlib/NumberTheory/Divisors.lean

tactic: ext
state_before: n : ℕ
⊢ divisorsAntidiagonal 0 = ∅

tactic: simp
state_before: case a
n : ℕ
a✝ : ℕ × ℕ
⊢ a✝ ∈ divisorsAntidiagonal 0 ↔ a✝ ∈ ∅
Theorem: MeasurableSet.image_inclusion'
File: Mathlib/MeasureTheory/MeasurableSpace.lean

tactic: rcases hu with ⟨u, hu, rfl⟩
state_before: α : Type u_1
β : Type ?u.62091
γ : Type ?u.62094
δ : Type ?u.62097
δ' : Type ?u.62100
ι : Sort uι
s✝ t✝ u✝ : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
s t : Set α
h : s ⊆ t
u : Set ↑s
hs : MeasurableSet (Subtype.val ⁻¹' s)
hu : MeasurableSet u
⊢ MeasurableSet (inclusion h '' u)

tactic: convert (measurable_subtype_coe hu).inter hs
state_before: case intro.intro
α : Type u_1
β : Type ?u.62091
γ : Type ?u.62094
δ : Type ?u.62097
δ' : Type ?u.62100
ι : Sort uι
s✝ t✝ u✝ : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
s t : Set α
h : s ⊆ t
hs : MeasurableSet (Subtype.val ⁻¹' s)
u : Set α
hu : MeasurableSet u
⊢ MeasurableSet (inclusion h '' (Subtype.val ⁻¹' u))

tactic: ext ⟨x, hx⟩
state_before: case h.e'_3
α : Type u_1
β : Type ?u.62091
γ : Type ?u.62094
δ : Type ?u.62097
δ' : Type ?u.62100
ι : Sort uι
s✝ t✝ u✝ : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
s t : Set α
h : s ⊆ t
hs : MeasurableSet (Subtype.val ⁻¹' s)
u : Set α
hu : MeasurableSet u
⊢ inclusion h '' (Subtype.val ⁻¹' u) = Subtype.val ⁻¹' u ∩ Subtype.val ⁻¹' s

tactic: simpa [@and_comm _ (_ = x)] using and_comm
state_before: case h.e'_3.h.mk
α : Type u_1
β : Type ?u.62091
γ : Type ?u.62094
δ : Type ?u.62097
δ' : Type ?u.62100
ι : Sort uι
s✝ t✝ u✝ : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
s t : Set α
h : s ⊆ t
hs : MeasurableSet (Subtype.val ⁻¹' s)
u : Set α
hu : MeasurableSet u
x : α
hx : x ∈ t
⊢ { val := x, property := hx } ∈ inclusion h '' (Subtype.val ⁻¹' u) ↔
    { val := x, property := hx } ∈ Subtype.val ⁻¹' u ∩ Subtype.val ⁻¹' s
Theorem: List.Perm.pairwise_iff
File: Mathlib/Data/List/Perm.lean

tactic: induction' d with a l₁ h _ IH generalizing l₂
state_before: α : Type uu
β : Type vv
l₁✝¹ l₂✝¹ : List α
R : α → α → Prop
S : Symmetric R
l₁✝ l₂✝ l₁ l₂ : List α
p : l₁ ~ l₂
d : Pairwise R l₁
⊢ Pairwise R l₂

tactic: rw [← p.nil_eq]
state_before: case nil
α : Type uu
β : Type vv
l₁✝¹ l₂✝² : List α
R : α → α → Prop
S : Symmetric R
l₁✝ l₂✝¹ l₁ l₂✝ : List α
p✝ : l₁ ~ l₂✝
l₂ : List α
p : [] ~ l₂
⊢ Pairwise R l₂

tactic: constructor
state_before: case nil
α : Type uu
β : Type vv
l₁✝¹ l₂✝² : List α
R : α → α → Prop
S : Symmetric R
l₁✝ l₂✝¹ l₁ l₂✝ : List α
p✝ : l₁ ~ l₂✝
l₂ : List α
p : [] ~ l₂
⊢ Pairwise R []

tactic: have : a ∈ l₂ := p.subset (mem_cons_self _ _)
state_before: case cons
α : Type uu
β : Type vv
l₁✝² l₂✝² : List α
R : α → α → Prop
S : Symmetric R
l₁✝¹ l₂✝¹ l₁✝ l₂✝ : List α
p✝ : l₁✝ ~ l₂✝
a : α
l₁ : List α
h : ∀ (a' : α), a' ∈ l₁ → R a a'
a✝ : Pairwise R l₁
IH : ∀ (l₂ : List α), l₁ ~ l₂ → Pairwise R l₂
l₂ : List α
p : a :: l₁ ~ l₂
⊢ Pairwise R l₂

tactic: rcases mem_split this with ⟨s₂, t₂, rfl⟩
state_before: case cons
α : Type uu
β : Type vv
l₁✝² l₂✝² : List α
R : α → α → Prop
S : Symmetric R
l₁✝¹ l₂✝¹ l₁✝ l₂✝ : List α
p✝ : l₁✝ ~ l₂✝
a : α
l₁ : List α
h : ∀ (a' : α), a' ∈ l₁ → R a a'
a✝ : Pairwise R l₁
IH : ∀ (l₂ : List α), l₁ ~ l₂ → Pairwise R l₂
l₂ : List α
p : a :: l₁ ~ l₂
this : a ∈ l₂
⊢ Pairwise R l₂

tactic: have p' := (p.trans perm_middle).cons_inv
state_before: case cons.intro.intro
α : Type uu
β : Type vv
l₁✝² l₂✝¹ : List α
R : α → α → Prop
S : Symmetric R
l₁✝¹ l₂✝ l₁✝ l₂ : List α
p✝ : l₁✝ ~ l₂
a : α
l₁ : List α
h : ∀ (a' : α), a' ∈ l₁ → R a a'
a✝ : Pairwise R l₁
IH : ∀ (l₂ : List α), l₁ ~ l₂ → Pairwise R l₂
s₂ t₂ : List α
p : a :: l₁ ~ s₂ ++ a :: t₂
this : a ∈ s₂ ++ a :: t₂
⊢ Pairwise R (s₂ ++ a :: t₂)

tactic: refine' (pairwise_middle S).2 (pairwise_cons.2 ⟨fun b m => _, IH _ p'⟩)
state_before: case cons.intro.intro
α : Type uu
β : Type vv
l₁✝² l₂✝¹ : List α
R : α → α → Prop
S : Symmetric R
l₁✝¹ l₂✝ l₁✝ l₂ : List α
p✝ : l₁✝ ~ l₂
a : α
l₁ : List α
h : ∀ (a' : α), a' ∈ l₁ → R a a'
a✝ : Pairwise R l₁
IH : ∀ (l₂ : List α), l₁ ~ l₂ → Pairwise R l₂
s₂ t₂ : List α
p : a :: l₁ ~ s₂ ++ a :: t₂
this : a ∈ s₂ ++ a :: t₂
p' : l₁ ~ s₂ ++ t₂
⊢ Pairwise R (s₂ ++ a :: t₂)

tactic: exact h _ (p'.symm.subset m)
state_before: case cons.intro.intro
α : Type uu
β : Type vv
l₁✝² l₂✝¹ : List α
R : α → α → Prop
S : Symmetric R
l₁✝¹ l₂✝ l₁✝ l₂ : List α
p✝ : l₁✝ ~ l₂
a : α
l₁ : List α
h : ∀ (a' : α), a' ∈ l₁ → R a a'
a✝ : Pairwise R l₁
IH : ∀ (l₂ : List α), l₁ ~ l₂ → Pairwise R l₂
s₂ t₂ : List α
p : a :: l₁ ~ s₂ ++ a :: t₂
this : a ∈ s₂ ++ a :: t₂
p' : l₁ ~ s₂ ++ t₂
b : α
m : b ∈ s₂ ++ t₂
⊢ R a b
Theorem: Polynomial.eq_prod_roots_of_splits
File: Mathlib/Data/Polynomial/Splits.lean

tactic: rw [← leadingCoeff_map]
state_before: F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i✝ : K →+* L
p : K[X]
i : K →+* L
hsplit : Splits i p
⊢ map i p = ↑C (↑i (leadingCoeff p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (map i p)))

tactic: symm
state_before: F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i✝ : K →+* L
p : K[X]
i : K →+* L
hsplit : Splits i p
⊢ map i p = ↑C (leadingCoeff (map i p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (map i p)))

tactic: apply C_leadingCoeff_mul_prod_multiset_X_sub_C
state_before: F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i✝ : K →+* L
p : K[X]
i : K →+* L
hsplit : Splits i p
⊢ ↑C (leadingCoeff (map i p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (map i p))) = map i p

tactic: rw [natDegree_map]
state_before: case hroots
F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i✝ : K →+* L
p : K[X]
i : K →+* L
hsplit : Splits i p
⊢ ↑Multiset.card (roots (map i p)) = natDegree (map i p)

tactic: exact (natDegree_eq_card_roots hsplit).symm
state_before: case hroots
F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i✝ : K →+* L
p : K[X]
i : K →+* L
hsplit : Splits i p
⊢ ↑Multiset.card (roots (map i p)) = natDegree p
Theorem: LipschitzOnWith.norm_div_le_of_le
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: gcongr
state_before: 𝓕 : Type ?u.186854
𝕜 : Type ?u.186857
α : Type ?u.186860
ι : Type ?u.186863
κ : Type ?u.186866
E : Type u_1
F : Type u_2
G : Type ?u.186875
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
f : E → F
C : ℝ≥0
h : LipschitzOnWith C f s
ha : a ∈ s
hb : b ∈ s
hr : ‖a / b‖ ≤ r
⊢ ↑C * ‖a / b‖ ≤ ↑C * r
Theorem: Int.mul_ediv_cancel_of_emod_eq_zero
File: Std/Data/Int/DivMod.lean

tactic: have := emod_add_ediv a b
state_before: a b : Int
H : a % b = 0
⊢ b * (a / b) = a

tactic: rwa [H, Int.zero_add] at this
state_before: a b : Int
H : a % b = 0
this : a % b + b * (a / b) = a
⊢ b * (a / b) = a
Theorem: List.append_assoc
File: src/lean/Init/Data/List/Basic.lean

tactic: induction as with
| nil => rfl
| cons a as ih => simp [ih]
state_before: α : Type u
β : Type v
γ : Type w
as bs cs : List α
⊢ as ++ bs ++ cs = as ++ (bs ++ cs)

tactic: rfl
state_before: case nil
α : Type u
β : Type v
γ : Type w
bs cs : List α
⊢ nil ++ bs ++ cs = nil ++ (bs ++ cs)

tactic: simp [ih]
state_before: case cons
α : Type u
β : Type v
γ : Type w
bs cs : List α
a : α
as : List α
ih : as ++ bs ++ cs = as ++ (bs ++ cs)
⊢ a :: as ++ bs ++ cs = a :: as ++ (bs ++ cs)
Theorem: IsAddCyclic.card_orderOf_eq_totient
File: Mathlib/GroupTheory/SpecificGroups/Cyclic.lean

tactic: obtain ⟨g, hg⟩ := id ‹IsAddCyclic α›
state_before: α✝ : Type u
a : α✝
inst✝³ : Group α✝
α : Type u_1
inst✝² : AddGroup α
inst✝¹ : IsAddCyclic α
inst✝ : Fintype α
d : ℕ
hd : d ∣ Fintype.card α
⊢ card (filter (fun a => addOrderOf a = d) univ) = φ d

tactic: apply @IsCyclic.card_orderOf_eq_totient (Multiplicative α) _ ⟨⟨g, hg⟩⟩ (_) _ hd
state_before: case mk.intro
α✝ : Type u
a : α✝
inst✝³ : Group α✝
α : Type u_1
inst✝² : AddGroup α
inst✝¹ : IsAddCyclic α
inst✝ : Fintype α
d : ℕ
hd : d ∣ Fintype.card α
g : α
hg : ∀ (x : α), x ∈ AddSubgroup.zmultiples g
⊢ card (filter (fun a => addOrderOf a = d) univ) = φ d
Theorem: Matrix.conjTranspose_zero
File: Mathlib/Data/Matrix/Basic.lean

tactic: simp
state_before: l : Type ?u.955922
m : Type u_1
n : Type u_2
o : Type ?u.955931
m' : o → Type ?u.955936
n' : o → Type ?u.955941
R : Type ?u.955944
S : Type ?u.955947
α : Type v
β : Type w
γ : Type ?u.955954
inst✝¹ : AddMonoid α
inst✝ : StarAddMonoid α
⊢ ∀ (i : n) (j : m), 0ᴴ i j = OfNat.ofNat 0 i j
Theorem: Associates.count_some
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: dsimp only [count]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : DecidableEq (Associates α)
p : Associates α
hp : Irreducible p
s : Multiset { a // Irreducible a }
⊢ count p (some s) = Multiset.count { val := p, property := hp } s

tactic: split_ifs
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : DecidableEq (Associates α)
p : Associates α
hp : Irreducible p
s : Multiset { a // Irreducible a }
⊢ dite (Irreducible p) (fun hp => bcount { val := p, property := hp }) (fun hp => 0) (some s) =
    Multiset.count { val := p, property := hp } s

tactic: rfl
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : DecidableEq (Associates α)
p : Associates α
hp : Irreducible p
s : Multiset { a // Irreducible a }
⊢ bcount { val := p, property := hp } (some s) = Multiset.count { val := p, property := hp } s
Theorem: Sum.isRight_iff
File: Mathlib/Data/Sum/Basic.lean

tactic: cases x <;> simp
state_before: α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type ?u.8798
δ : Type ?u.8801
x y : α ⊕ β
⊢ isRight x = true ↔ ∃ y, x = inr y
Theorem: ProbabilityTheory.kernel.finset_sum_apply'
File: Mathlib/Probability/Kernel/Basic.lean

tactic: rw [finset_sum_apply, Measure.finset_sum_apply]
state_before: α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
I : Finset ι
κ : ι → { x // x ∈ kernel α β }
a : α
s : Set β
⊢ ↑↑(↑(∑ i in I, κ i) a) s = ∑ i in I, ↑↑(↑(κ i) a) s
Theorem: Polynomial.nextCoeff_X_add_C
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: nontriviality S
state_before: R : Type u
S : Type v
a b c✝ d : R
n m : ℕ
inst✝² : Nontrivial R
inst✝¹ : Semiring R
inst✝ : Semiring S
c : S
⊢ nextCoeff (X + ↑C c) = c

tactic: simp [nextCoeff_of_pos_natDegree]
state_before: R : Type u
S : Type v
a b c✝ d : R
n m : ℕ
inst✝² : Nontrivial R
inst✝¹ : Semiring R
inst✝ : Semiring S
c : S
✝ : Nontrivial S
⊢ nextCoeff (X + ↑C c) = c
Theorem: smul_univ_pi
File: Mathlib/Algebra/Module/PointwisePi.lean

tactic: refine' ⟨fun i ↦ Classical.choose (h i <| Set.mem_univ _), fun i _ ↦ _, funext fun i ↦ _⟩
state_before: K : Type u_1
ι : Type u_3
R : ι → Type u_2
inst✝ : (i : ι) → SMul K (R i)
r : K
t : (i : ι) → Set (R i)
x : (i : ι) → R i
h : x ∈ pi univ (r • t)
⊢ x ∈ r • pi univ t

tactic: exact (Classical.choose_spec (h i <| Set.mem_univ i)).left
state_before: case refine'_1
K : Type u_1
ι : Type u_3
R : ι → Type u_2
inst✝ : (i : ι) → SMul K (R i)
r : K
t : (i : ι) → Set (R i)
x : (i : ι) → R i
h : x ∈ pi univ (r • t)
i : ι
x✝ : i ∈ univ
⊢ (fun i => Classical.choose (_ : x i ∈ (r • t) i)) i ∈ t i

tactic: exact (Classical.choose_spec (h i <| Set.mem_univ i)).right
state_before: case refine'_2
K : Type u_1
ι : Type u_3
R : ι → Type u_2
inst✝ : (i : ι) → SMul K (R i)
r : K
t : (i : ι) → Set (R i)
x : (i : ι) → R i
h : x ∈ pi univ (r • t)
i : ι
⊢ (fun x => r • x) (fun i => Classical.choose (_ : x i ∈ (r • t) i)) i = x i