tasksource/leandojo huggingface dataset:
Theorem: Finset.pi_singletons
File: Mathlib/Data/Finset/Pi.lean

tactic: rw [eq_singleton_iff_unique_mem]
state_before: α : Type u_2
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
β : Type u_1
s : Finset α
f : α → β
⊢ (pi s fun a => {f a}) = {fun a x => f a}

tactic: constructor
state_before: α : Type u_2
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
β : Type u_1
s : Finset α
f : α → β
⊢ ((fun a x => f a) ∈ pi s fun a => {f a}) ∧ ∀ (x : (a : α) → a ∈ s → β), (x ∈ pi s fun a => {f a}) → x = fun a x => f a

tactic: intro a ha
state_before: case right
α : Type u_2
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
β : Type u_1
s : Finset α
f : α → β
⊢ ∀ (x : (a : α) → a ∈ s → β), (x ∈ pi s fun a => {f a}) → x = fun a x => f a

tactic: ext (i hi)
state_before: case right
α : Type u_2
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
β : Type u_1
s : Finset α
f : α → β
a : (a : α) → a ∈ s → β
ha : a ∈ pi s fun a => {f a}
⊢ a = fun a x => f a

tactic: rw [mem_pi] at ha
state_before: case right.h.h
α : Type u_2
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
β : Type u_1
s : Finset α
f : α → β
a : (a : α) → a ∈ s → β
ha : a ∈ pi s fun a => {f a}
i : α
hi : i ∈ s
⊢ a i hi = f i

tactic: simpa using ha i hi
state_before: case right.h.h
α : Type u_2
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
β : Type u_1
s : Finset α
f : α → β
a : (a : α) → a ∈ s → β
ha : ∀ (a_1 : α) (h : a_1 ∈ s), a a_1 h ∈ {f a_1}
i : α
hi : i ∈ s
⊢ a i hi = f i

tactic: simp
state_before: case left
α : Type u_2
β✝ : α → Type u
δ : α → Sort v
inst✝ : DecidableEq α
β : Type u_1
s : Finset α
f : α → β
⊢ (fun a x => f a) ∈ pi s fun a => {f a}
Theorem: Nat.lt_add_of_zero_lt_left
File: Mathlib/Init/Meta/WellFoundedTactics.lean

tactic: apply Nat.add_lt_add_left
state_before: a b : ℕ
h : 0 < b
⊢ a + 0 < a + b

tactic: assumption
state_before: case h
a b : ℕ
h : 0 < b
⊢ 0 < b
Theorem: Set.Subsingleton.equitableOn
File: Mathlib/Data/Set/Equitable.lean

tactic: rw [hs hi hj]
state_before: α : Type u_1
β : Type u_2
inst✝ : OrderedSemiring β
s : Set α
hs : Set.Subsingleton s
f : α → β
i j : α
hi : i ∈ s
hj : j ∈ s
⊢ f i ≤ f j + 1

tactic: exact le_add_of_nonneg_right zero_le_one
state_before: α : Type u_1
β : Type u_2
inst✝ : OrderedSemiring β
s : Set α
hs : Set.Subsingleton s
f : α → β
i j : α
hi : i ∈ s
hj : j ∈ s
⊢ f j ≤ f j + 1
Theorem: Relation.ReflTransGen.lift'
File: Mathlib/Logic/Relation.lean

tactic: simpa [refl_trans_gen_idem] using hab.lift f h
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.26340
δ : Type ?u.26343
r : α → α → Prop
a✝ b✝ c d : α
p : β → β → Prop
a b : α
f : α → β
h : ∀ (a b : α), r a b → ReflTransGen p (f a) (f b)
hab : ReflTransGen r a b
⊢ ReflTransGen p (f a) (f b)
Theorem: Int.mul_emod_left
File: Std/Data/Int/DivMod.lean

tactic: rw [← Int.zero_add (a * b), Int.add_mul_emod_self, Int.zero_emod]
state_before: a b : Int
⊢ a * b % b = 0
Theorem: IsOrderRightAdjoint.comp_orderIso
File: Mathlib/Order/SemiconjSup.lean

tactic: intro y
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β
g : β → α
h : IsOrderRightAdjoint f g
e : γ ≃o α
⊢ IsOrderRightAdjoint (f ∘ ↑e) (↑(OrderIso.symm e) ∘ g)

tactic: change IsLUB (e ⁻¹' { x | f x ≤ y }) (e.symm (g y))
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β
g : β → α
h : IsOrderRightAdjoint f g
e : γ ≃o α
y : β
⊢ IsLUB {x | (f ∘ ↑e) x ≤ y} ((↑(OrderIso.symm e) ∘ g) y)

tactic: rw [e.isLUB_preimage, e.apply_symm_apply]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β
g : β → α
h : IsOrderRightAdjoint f g
e : γ ≃o α
y : β
⊢ IsLUB (↑e ⁻¹' {x | f x ≤ y}) (↑(OrderIso.symm e) (g y))

tactic: exact h y
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β
g : β → α
h : IsOrderRightAdjoint f g
e : γ ≃o α
y : β
⊢ IsLUB {x | f x ≤ y} (g y)
Theorem: CategoryTheory.Limits.inr_pushoutZeroZeroIso_inv
File: Mathlib/CategoryTheory/Limits/Constructions/ZeroObjects.lean

tactic: simp [Iso.comp_inv_eq]
state_before: C : Type u_2
inst✝³ : Category C
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
X Y : C
inst✝ : HasBinaryCoproduct X Y
⊢ coprod.inr ≫ (pushoutZeroZeroIso X Y).inv = pushout.inr
Theorem: CauSeq.mul_limZero_left
File: Mathlib/Data/Real/CauSeq.lean

tactic: have := mul_lt_mul'' (H _ ij) (hG j) (abv_nonneg abv _) (abv_nonneg abv _)
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f g : CauSeq β abv
hg : LimZero f
ε : α
ε0 : ε > 0
G : α
G0 : G > 0
hG : ∀ (i : ℕ), abv (↑g i) < G
i : ℕ
H : ∀ (j : ℕ), j ≥ i → abv (↑f j) < ε / G
j : ℕ
ij : j ≥ i
⊢ abv (↑(f * g) j) < ε

tactic: rwa [div_mul_cancel _ (ne_of_gt G0), ← abv_mul] at this
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f g : CauSeq β abv
hg : LimZero f
ε : α
ε0 : ε > 0
G : α
G0 : G > 0
hG : ∀ (i : ℕ), abv (↑g i) < G
i : ℕ
H : ∀ (j : ℕ), j ≥ i → abv (↑f j) < ε / G
j : ℕ
ij : j ≥ i
this : abv (↑f j) * abv (↑g j) < ε / G * G
⊢ abv (↑(f * g) j) < ε
Theorem: CategoryTheory.Preadditive.kernelForkOfFork_ofι
File: Mathlib/CategoryTheory/Preadditive/Basic.lean

tactic: simp [w]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : Preadditive C
X Y : C
f g : X ⟶ Y
P : C
ι : P ⟶ X
w : ι ≫ f = ι ≫ g
⊢ ι ≫ (f - g) = 0
Theorem: CategoryTheory.Limits.image_map_comp_imageSubobjectIso_inv
File: Mathlib/CategoryTheory/Subobject/Limits.lean

tactic: ext
state_before: C : Type u
inst✝⁴ : Category C
X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
inst✝³ : HasImage f✝
W X Y Z : C
f : W ⟶ X
inst✝² : HasImage f
g : Y ⟶ Z
inst✝¹ : HasImage g
sq : Arrow.mk f ⟶ Arrow.mk g
inst✝ : HasImageMap sq
⊢ image.map sq ≫ (imageSubobjectIso (Arrow.mk g).hom).inv = (imageSubobjectIso f).inv ≫ imageSubobjectMap sq

tactic: simpa using image.map_ι sq
state_before: case h
C : Type u
inst✝⁴ : Category C
X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
inst✝³ : HasImage f✝
W X Y Z : C
f : W ⟶ X
inst✝² : HasImage f
g : Y ⟶ Z
inst✝¹ : HasImage g
sq : Arrow.mk f ⟶ Arrow.mk g
inst✝ : HasImageMap sq
⊢ (image.map sq ≫ (imageSubobjectIso (Arrow.mk g).hom).inv) ≫ arrow (imageSubobject (Arrow.mk g).hom) =
    ((imageSubobjectIso f).inv ≫ imageSubobjectMap sq) ≫ arrow (imageSubobject (Arrow.mk g).hom)
Theorem: ExceptT.lift_pure
File: src/lean/Init/Control/Lawful.lean

tactic: simp [ExceptT.lift, pure, ExceptT.pure]
state_before: m : Type u_1 → Type u_2
α ε : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
a : α
⊢ ExceptT.lift (pure a) = pure a
Theorem: le_one_of_mul_le_right
File: Mathlib/Algebra/Order/Monoid/Lemmas.lean

tactic: simpa only [mul_one]
state_before: α : Type u_1
β : Type ?u.15994
inst✝² : MulOneClass α
inst✝¹ : LE α
inst✝ : ContravariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b : α
h : a * b ≤ a
⊢ ?m.16338 h * b ≤ ?m.16338 h * 1
Theorem: rightCoset_eq_iff
File: Mathlib/GroupTheory/Coset.lean

tactic: rw [Set.ext_iff]
state_before: α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ ↑s *r x = ↑s *r y ↔ y * x⁻¹ ∈ s

tactic: simp_rw [mem_rightCoset_iff, SetLike.mem_coe]
state_before: α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ (∀ (x_1 : α), x_1 ∈ ↑s *r x ↔ x_1 ∈ ↑s *r y) ↔ y * x⁻¹ ∈ s

tactic: constructor
state_before: α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ (∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s) ↔ y * x⁻¹ ∈ s

tactic: intro h
state_before: case mp
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ (∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s) → y * x⁻¹ ∈ s

tactic: apply (h y).mpr
state_before: case mp
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : ∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s
⊢ y * x⁻¹ ∈ s

tactic: rw [mul_right_inv]
state_before: case mp
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : ∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s
⊢ y * y⁻¹ ∈ s

tactic: exact s.one_mem
state_before: case mp
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : ∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s
⊢ 1 ∈ s

tactic: intro h z
state_before: case mpr
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ y * x⁻¹ ∈ s → ∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s

tactic: rw [← inv_mul_cancel_left y x⁻¹]
state_before: case mpr
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : y * x⁻¹ ∈ s
z : α
⊢ z * x⁻¹ ∈ s ↔ z * y⁻¹ ∈ s

tactic: rw [← mul_assoc]
state_before: case mpr
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : y * x⁻¹ ∈ s
z : α
⊢ z * (y⁻¹ * (y * x⁻¹)) ∈ s ↔ z * y⁻¹ ∈ s

tactic: exact s.mul_mem_cancel_right h
state_before: case mpr
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : y * x⁻¹ ∈ s
z : α
⊢ z * y⁻¹ * (y * x⁻¹) ∈ s ↔ z * y⁻¹ ∈ s
Theorem: SimpleGraph.Walk.mem_support_iff
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: cases p <;> simp
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w : V
p : Walk G u v
⊢ w ∈ support p ↔ w = u ∨ w ∈ List.tail (support p)
Theorem: SetLike.list_prod_map_mem_graded
File: Mathlib/Algebra/GradedMonoid.lean

tactic: match l with
| [] =>
  rw [List.map_nil, List.map_nil, List.prod_nil, List.sum_nil]
  exact one_mem_graded _
| head::tail =>
  rw [List.map_cons, List.map_cons, List.prod_cons, List.sum_cons]
  exact
    mul_mem_graded (h _ <| List.mem_cons_self _ _)
      (list_prod_map_mem_graded tail _ _ <| fun j hj => h _ <| List.mem_cons_of_mem _ hj)
state_before: ι : Type u_4
R : Type u_2
S : Type u_3
inst✝³ : SetLike S R
inst✝² : Monoid R
inst✝¹ : AddMonoid ι
A : ι → S
inst✝ : GradedMonoid A
ι' : Type u_1
l : List ι'
i : ι' → ι
r : ι' → R
h : ∀ (j : ι'), j ∈ l → r j ∈ A (i j)
⊢ List.prod (List.map r l) ∈ A (List.sum (List.map i l))

tactic: rw [List.map_nil, List.map_nil, List.prod_nil, List.sum_nil]
state_before: ι : Type u_4
R : Type u_2
S : Type u_3
inst✝³ : SetLike S R
inst✝² : Monoid R
inst✝¹ : AddMonoid ι
A : ι → S
inst✝ : GradedMonoid A
ι' : Type u_1
l : List ι'
i : ι' → ι
r : ι' → R
h : ∀ (j : ι'), j ∈ [] → r j ∈ A (i j)
⊢ List.prod (List.map r []) ∈ A (List.sum (List.map i []))

tactic: exact one_mem_graded _
state_before: ι : Type u_4
R : Type u_2
S : Type u_3
inst✝³ : SetLike S R
inst✝² : Monoid R
inst✝¹ : AddMonoid ι
A : ι → S
inst✝ : GradedMonoid A
ι' : Type u_1
l : List ι'
i : ι' → ι
r : ι' → R
h : ∀ (j : ι'), j ∈ [] → r j ∈ A (i j)
⊢ 1 ∈ A 0

tactic: rw [List.map_cons, List.map_cons, List.prod_cons, List.sum_cons]
state_before: ι : Type u_4
R : Type u_2
S : Type u_3
inst✝³ : SetLike S R
inst✝² : Monoid R
inst✝¹ : AddMonoid ι
A : ι → S
inst✝ : GradedMonoid A
ι' : Type u_1
l : List ι'
i : ι' → ι
r : ι' → R
head : ι'
tail : List ι'
h : ∀ (j : ι'), j ∈ head :: tail → r j ∈ A (i j)
⊢ List.prod (List.map r (head :: tail)) ∈ A (List.sum (List.map i (head :: tail)))

tactic: exact
  mul_mem_graded (h _ <| List.mem_cons_self _ _)
    (list_prod_map_mem_graded tail _ _ <| fun j hj => h _ <| List.mem_cons_of_mem _ hj)
state_before: ι : Type u_4
R : Type u_2
S : Type u_3
inst✝³ : SetLike S R
inst✝² : Monoid R
inst✝¹ : AddMonoid ι
A : ι → S
inst✝ : GradedMonoid A
ι' : Type u_1
l : List ι'
i : ι' → ι
r : ι' → R
head : ι'
tail : List ι'
h : ∀ (j : ι'), j ∈ head :: tail → r j ∈ A (i j)
⊢ r head * List.prod (List.map r tail) ∈ A (i head + List.sum (List.map i tail))
Theorem: Coheyting.boundary_le_boundary_sup_sup_boundary_inf_left
File: Mathlib/Order/Heyting/Boundary.lean

tactic: simp only [boundary, sup_inf_left, sup_inf_right, sup_right_idem, le_inf_iff, sup_assoc,
  @sup_comm _ _ _ a]
state_before: α : Type u_1
inst✝ : CoheytingAlgebra α
a b : α
⊢ ∂ a ≤ ∂ (a ⊔ b) ⊔ ∂ (a ⊓ b)

tactic: refine ⟨⟨⟨?_, ?_⟩, ⟨?_, ?_⟩⟩, ?_, ?_⟩ <;> try { exact le_sup_of_le_left inf_le_left } <;>
  refine inf_le_of_right_le ?_
state_before: α : Type u_1
inst✝ : CoheytingAlgebra α
a b : α
⊢ ((a ⊓ ￢a ≤ a ⊔ (a ⊔ b) ∧ a ⊓ ￢a ≤ a ⊔ ￢(a ⊔ b)) ∧ a ⊓ ￢a ≤ a ⊔ b ∧ a ⊓ ￢a ≤ ￢(a ⊔ b) ⊔ b) ∧
    a ⊓ ￢a ≤ a ⊔ (b ⊔ ￢(a ⊓ b)) ∧ a ⊓ ￢a ≤ ￢(a ⊔ b) ⊔ ￢(a ⊓ b)

tactic: rw [hnot_le_iff_codisjoint_right, codisjoint_left_comm]
state_before: case refine_4
α : Type u_1
inst✝ : CoheytingAlgebra α
a b : α
⊢ ￢a ≤ ￢(a ⊔ b) ⊔ b

tactic: exact codisjoint_hnot_left
state_before: case refine_4
α : Type u_1
inst✝ : CoheytingAlgebra α
a b : α
⊢ Codisjoint (￢(a ⊔ b)) (a ⊔ b)

tactic: refine le_sup_of_le_right ?_
state_before: case refine_6
α : Type u_1
inst✝ : CoheytingAlgebra α
a b : α
⊢ ￢a ≤ ￢(a ⊔ b) ⊔ ￢(a ⊓ b)

tactic: rw [hnot_le_iff_codisjoint_right]
state_before: case refine_6
α : Type u_1
inst✝ : CoheytingAlgebra α
a b : α
⊢ ￢a ≤ ￢(a ⊓ b)

tactic: exact codisjoint_hnot_right.mono_right (hnot_anti inf_le_left)
state_before: case refine_6
α : Type u_1
inst✝ : CoheytingAlgebra α
a b : α
⊢ Codisjoint a (￢(a ⊓ b))
Theorem: SeparationQuotient.map_mk_nhdsWithin_preimage
File: Mathlib/Topology/Inseparable.lean

tactic: rw [nhdsWithin, ← comap_principal, Filter.push_pull, nhdsWithin, map_mk_nhds]
state_before: X : Type u_1
Y : Type ?u.91061
Z : Type ?u.91064
α : Type ?u.91067
ι : Type ?u.91070
π : ι → Type ?u.91075
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : (i : ι) → TopologicalSpace (π i)
x✝ y z : X
s✝ : Set X
f : X → Y
t s : Set (SeparationQuotient X)
x : X
⊢ Filter.map mk (𝓝[mk ⁻¹' s] x) = 𝓝[s] mk x
Theorem: not_linearIndependent_iff
File: Mathlib/LinearAlgebra/LinearIndependent.lean

tactic: rw [linearIndependent_iff']
state_before: ι : Type u'
ι' : Type ?u.26530
R : Type u_1
K : Type ?u.26536
M : Type u_2
M' : Type ?u.26542
M'' : Type ?u.26545
V : Type u
V' : Type ?u.26550
v : ι → M
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M'
inst✝³ : AddCommMonoid M''
inst✝² : Module R M
inst✝¹ : Module R M'
inst✝ : Module R M''
a b : R
x y : M
⊢ ¬LinearIndependent R v ↔ ∃ s g, ∑ i in s, g i • v i = 0 ∧ ∃ i, i ∈ s ∧ g i ≠ 0

tactic: simp only [exists_prop, not_forall]
state_before: ι : Type u'
ι' : Type ?u.26530
R : Type u_1
K : Type ?u.26536
M : Type u_2
M' : Type ?u.26542
M'' : Type ?u.26545
V : Type u
V' : Type ?u.26550
v : ι → M
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M'
inst✝³ : AddCommMonoid M''
inst✝² : Module R M
inst✝¹ : Module R M'
inst✝ : Module R M''
a b : R
x y : M
⊢ (¬∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • v i = 0 → ∀ (i : ι), i ∈ s → g i = 0) ↔
    ∃ s g, ∑ i in s, g i • v i = 0 ∧ ∃ i, i ∈ s ∧ g i ≠ 0
Theorem: Polynomial.modByMonic_zero
File: Mathlib/Data/Polynomial/Div.lean

tactic: haveI := monic_zero_iff_subsingleton.mp h
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
p✝ q p : R[X]
h : Monic 0
⊢ p %ₘ 0 = p

tactic: simp
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
p✝ q p : R[X]
h : Monic 0
this : Subsingleton R
⊢ p %ₘ 0 = p

tactic: unfold modByMonic divModByMonicAux
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
p✝ q p : R[X]
h : ¬Monic 0
⊢ p %ₘ 0 = p

tactic: rw [dif_neg h]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
p✝ q p : R[X]
h : ¬Monic 0
⊢ (if h : Monic 0 then
      (if h_1 : degree 0 ≤ degree p ∧ p ≠ 0 then
          let z := ↑C (leadingCoeff p) * X ^ (natDegree p - natDegree 0);
          let_fun _wf := (_ : degree (p - ↑C (leadingCoeff p) * X ^ (natDegree p - natDegree 0) * 0) < degree p);
          let dm := divModByMonicAux (p - z * 0) (_ : Monic 0);
          (z + dm.fst, dm.snd)
        else (0, p)).snd
    else p) =
    p
Theorem: Finset.image_comm
File: Mathlib/Data/Finset/Image.lean

tactic: simp_rw [image_image, comp, h_comm]
state_before: α : Type u_4
β : Type u_3
γ : Type u_2
inst✝² : DecidableEq β
f✝ g✝ : α → β
s : Finset α
t : Finset β
a : α
b c : β
β' : Type u_1
inst✝¹ : DecidableEq β'
inst✝ : DecidableEq γ
f : β → γ
g : α → β
f' : α → β'
g' : β' → γ
h_comm : ∀ (a : α), f (g a) = g' (f' a)
⊢ image f (image g s) = image g' (image f' s)
Theorem: SimpleGraph.ComponentCompl.hom_eq_iff_not_disjoint
File: Mathlib/Combinatorics/SimpleGraph/Ends/Defs.lean

tactic: rw [Set.not_disjoint_iff]
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
C : ComponentCompl G L
h : K ⊆ L
D : ComponentCompl G K
⊢ hom h C = D ↔ ¬Disjoint ↑C ↑D

tactic: constructor
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
C : ComponentCompl G L
h : K ⊆ L
D : ComponentCompl G K
⊢ hom h C = D ↔ ∃ x, x ∈ ↑C ∧ x ∈ ↑D

tactic: rintro rfl
state_before: case mp
V : Type u
G : SimpleGraph V
K L L' M : Set V
C : ComponentCompl G L
h : K ⊆ L
D : ComponentCompl G K
⊢ hom h C = D → ∃ x, x ∈ ↑C ∧ x ∈ ↑D

tactic: refine C.ind fun x xnL => ?_
state_before: case mp
V : Type u
G : SimpleGraph V
K L L' M : Set V
C : ComponentCompl G L
h : K ⊆ L
⊢ ∃ x, x ∈ ↑C ∧ x ∈ ↑(hom h C)

tactic: exact ⟨x, ⟨xnL, rfl⟩, ⟨fun xK => xnL (h xK), rfl⟩⟩
state_before: case mp
V : Type u
G : SimpleGraph V
K L L' M : Set V
C : ComponentCompl G L
h : K ⊆ L
x : V
xnL : ¬x ∈ L
⊢ ∃ x_1, x_1 ∈ ↑(componentComplMk G xnL) ∧ x_1 ∈ ↑(hom h (componentComplMk G xnL))

tactic: refine C.ind fun x xnL => ?_
state_before: case mpr
V : Type u
G : SimpleGraph V
K L L' M : Set V
C : ComponentCompl G L
h : K ⊆ L
D : ComponentCompl G K
⊢ (∃ x, x ∈ ↑C ∧ x ∈ ↑D) → hom h C = D

tactic: rintro ⟨x, ⟨_, e₁⟩, _, rfl⟩
state_before: case mpr
V : Type u
G : SimpleGraph V
K L L' M : Set V
C : ComponentCompl G L
h : K ⊆ L
D : ComponentCompl G K
x : V
xnL : ¬x ∈ L
⊢ (∃ x_1, x_1 ∈ ↑(componentComplMk G xnL) ∧ x_1 ∈ ↑D) → hom h (componentComplMk G xnL) = D

tactic: rw [← e₁]
state_before: case mpr.intro.intro.intro.intro
V : Type u
G : SimpleGraph V
K L L' M : Set V
C : ComponentCompl G L
h : K ⊆ L
x✝ : V
xnL : ¬x✝ ∈ L
x : V
w✝¹ : ¬x ∈ L
e₁ : componentComplMk G w✝¹ = componentComplMk G xnL
w✝ : ¬x ∈ K
⊢ hom h (componentComplMk G xnL) = componentComplMk G w✝

tactic: rfl
state_before: case mpr.intro.intro.intro.intro
V : Type u
G : SimpleGraph V
K L L' M : Set V
C : ComponentCompl G L
h : K ⊆ L
x✝ : V
xnL : ¬x✝ ∈ L
x : V
w✝¹ : ¬x ∈ L
e₁ : componentComplMk G w✝¹ = componentComplMk G xnL
w✝ : ¬x ∈ K
⊢ hom h (componentComplMk G w✝¹) = componentComplMk G w✝
Theorem: List.nthLe_cyclicPermutations
File: Mathlib/Data/List/Rotate.lean

tactic: obtain rfl | h := eq_or_ne l []
state_before: α : Type u
l✝ l' l : List α
n : ℕ
hn : n < length (cyclicPermutations l)
⊢ nthLe (cyclicPermutations l) n hn = rotate l n

tactic: simp
state_before: case inl
α : Type u
l l' : List α
n : ℕ
hn : n < length (cyclicPermutations [])
⊢ nthLe (cyclicPermutations []) n hn = rotate [] n

tactic: rw [length_cyclicPermutations_of_ne_nil _ h] at hn
state_before: case inr
α : Type u
l✝ l' l : List α
n : ℕ
hn : n < length (cyclicPermutations l)
h : l ≠ []
⊢ nthLe (cyclicPermutations l) n hn = rotate l n

tactic: simp [dropLast_eq_take, cyclicPermutations_of_ne_nil _ h, nthLe_take',
  rotate_eq_drop_append_take hn.le]
state_before: case inr
α : Type u
l✝ l' l : List α
n : ℕ
hn✝ : n < length (cyclicPermutations l)
hn : n < length l
h : l ≠ []
⊢ nthLe (cyclicPermutations l) n hn✝ = rotate l n
Theorem: IsExposed.mono
File: Mathlib/Analysis/Convex/Exposed.lean

tactic: rintro ⟨w, hw⟩
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : OrderedRing 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : TopologicalSpace E
inst✝ : Module 𝕜 E
l : E →L[𝕜] 𝕜
A B C : Set E
X : Finset E
x : E
hC : IsExposed 𝕜 A C
hBA : B ⊆ A
hCB : C ⊆ B
⊢ IsExposed 𝕜 B C

tactic: obtain ⟨l, rfl⟩ := hC ⟨w, hw⟩
state_before: case intro
𝕜 : Type u_1
E : Type u_2
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : OrderedRing 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : TopologicalSpace E
inst✝ : Module 𝕜 E
l : E →L[𝕜] 𝕜
A B C : Set E
X : Finset E
x : E
hC : IsExposed 𝕜 A C
hBA : B ⊆ A
hCB : C ⊆ B
w : E
hw : w ∈ C
⊢ ∃ l, C = {x | x ∈ B ∧ ∀ (y : E), y ∈ B → ↑l y ≤ ↑l x}

tactic: exact ⟨l, Subset.antisymm (fun x hx => ⟨hCB hx, fun y hy => hx.2 y (hBA hy)⟩) fun x hx =>
  ⟨hBA hx.1, fun y hy => (hw.2 y hy).trans (hx.2 w (hCB hw))⟩⟩
state_before: case intro.intro
𝕜 : Type u_1
E : Type u_2
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : OrderedRing 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : TopologicalSpace E
inst✝ : Module 𝕜 E
l✝ : E →L[𝕜] 𝕜
A B : Set E
X : Finset E
x : E
hBA : B ⊆ A
w : E
l : E →L[𝕜] 𝕜
hC : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}
hCB : {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x} ⊆ B
hw : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}
⊢ ∃ l_1, {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x} = {x | x ∈ B ∧ ∀ (y : E), y ∈ B → ↑l_1 y ≤ ↑l_1 x}
Theorem: PFun.coe_preimage
File: Mathlib/Data/PFun.lean

tactic: ext
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.45105
δ : Type ?u.45108
ε : Type ?u.45111
ι : Type ?u.45114
f✝ : α →. β
f : α → β
s : Set β
⊢ preimage (↑f) s = f ⁻¹' s

tactic: simp
state_before: case h
α : Type u_2
β : Type u_1
γ : Type ?u.45105
δ : Type ?u.45108
ε : Type ?u.45111
ι : Type ?u.45114
f✝ : α →. β
f : α → β
s : Set β
x✝ : α
⊢ x✝ ∈ preimage (↑f) s ↔ x✝ ∈ f ⁻¹' s
Theorem: GeneralizedContinuedFraction.numerators_stable_of_terminated
File: Mathlib/Algebra/ContinuedFractions/TerminatedStable.lean

tactic: simp only [num_eq_conts_a, continuants_stable_of_terminated n_le_m terminated_at_n]
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
n m : ℕ
inst✝ : DivisionRing K
n_le_m : n ≤ m
terminated_at_n : TerminatedAt g n
⊢ numerators g m = numerators g n
Theorem: disjoint_nhds_nhds
File: Mathlib/Topology/Separation.lean

tactic: simp [he, nhds_neBot.ne] at hd
state_before: α : Type u
β : Type v
inst✝¹ : TopologicalSpace α
inst✝ : T2Space α
x y : α
hd : Disjoint (𝓝 x) (𝓝 y)
he : x = y
⊢ False
Theorem: Std.RBNode.Ordered.insert
File: Std/Data/RBMap/WF.lean

tactic: unfold RBNode.insert
state_before: α✝ : Type u_1
cmp : α✝ → α✝ → Ordering
t : RBNode α✝
v : α✝
h : Ordered cmp t
⊢ Ordered cmp (insert cmp t v)

tactic: split <;> simp [Ordered.setBlack, h.ins (x := v)]
state_before: α✝ : Type u_1
cmp : α✝ → α✝ → Ordering
t : RBNode α✝
v : α✝
h : Ordered cmp t
⊢ Ordered cmp
    (match isRed t with
    | red => setBlack (ins cmp v t)
    | black => ins cmp v t)
Theorem: MeasureTheory.prob_compl_eq_one_sub
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: simpa only [measure_univ] using measure_compl hs (measure_lt_top μ s).ne
state_before: α : Type u_1
β : Type ?u.707839
γ : Type ?u.707842
δ : Type ?u.707845
ι : Type ?u.707848
R : Type ?u.707851
R' : Type ?u.707854
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
inst✝ : IsProbabilityMeasure μ
hs : MeasurableSet s
⊢ ↑↑μ (sᶜ) = 1 - ↑↑μ s
Theorem: Tactic.NormNum.int_not_isCoprime_helper
File: Mathlib/Tactic/NormNum/IsCoprime.lean

tactic: rw [Int.isCoprime_iff_gcd_eq_one, hd]
state_before: x y : ℤ
d : ℕ
hd : Int.gcd x y = d
h : Nat.beq d 1 = false
⊢ ¬IsCoprime x y

tactic: exact Nat.ne_of_beq_eq_false h
state_before: x y : ℤ
d : ℕ
hd : Int.gcd x y = d
h : Nat.beq d 1 = false
⊢ ¬d = 1