tasksource/leandojo huggingface dataset:
Theorem: CategoryTheory.GlueData.ι_gluedIso_hom
File: Mathlib/CategoryTheory/GlueData.lean

tactic: haveI : HasColimit (MultispanIndex.multispan (diagram (mapGlueData D F))) := inferInstance
state_before: C : Type u₁
inst✝³ : Category C
C' : Type u₂
inst✝² : Category C'
D : GlueData C
F : C ⥤ C'
H : (i j k : D.J) → PreservesLimit (cospan (f D i j) (f D i k)) F
inst✝¹ : HasMulticoequalizer (diagram D)
inst✝ : PreservesColimit (MultispanIndex.multispan (diagram D)) F
i : D.J
⊢ F.map (ι D i) ≫ (gluedIso D F).hom = ι (mapGlueData D F) i

tactic: erw [ι_preservesColimitsIso_hom_assoc]
state_before: C : Type u₁
inst✝³ : Category C
C' : Type u₂
inst✝² : Category C'
D : GlueData C
F : C ⥤ C'
H : (i j k : D.J) → PreservesLimit (cospan (f D i j) (f D i k)) F
inst✝¹ : HasMulticoequalizer (diagram D)
inst✝ : PreservesColimit (MultispanIndex.multispan (diagram D)) F
i : D.J
this : HasColimit (MultispanIndex.multispan (diagram (mapGlueData D F)))
⊢ F.map (ι D i) ≫ (gluedIso D F).hom = ι (mapGlueData D F) i

tactic: rw [HasColimit.isoOfNatIso_ι_hom]
state_before: C : Type u₁
inst✝³ : Category C
C' : Type u₂
inst✝² : Category C'
D : GlueData C
F : C ⥤ C'
H : (i j k : D.J) → PreservesLimit (cospan (f D i j) (f D i k)) F
inst✝¹ : HasMulticoequalizer (diagram D)
inst✝ : PreservesColimit (MultispanIndex.multispan (diagram D)) F
i : D.J
this : HasColimit (MultispanIndex.multispan (diagram (mapGlueData D F)))
⊢ colimit.ι (MultispanIndex.multispan (diagram D) ⋙ F) (WalkingMultispan.right i) ≫
      (HasColimit.isoOfNatIso (diagramIso D F)).hom =
    ι (mapGlueData D F) i

tactic: erw [Category.id_comp]
state_before: C : Type u₁
inst✝³ : Category C
C' : Type u₂
inst✝² : Category C'
D : GlueData C
F : C ⥤ C'
H : (i j k : D.J) → PreservesLimit (cospan (f D i j) (f D i k)) F
inst✝¹ : HasMulticoequalizer (diagram D)
inst✝ : PreservesColimit (MultispanIndex.multispan (diagram D)) F
i : D.J
this : HasColimit (MultispanIndex.multispan (diagram (mapGlueData D F)))
⊢ (diagramIso D F).hom.app (WalkingMultispan.right i) ≫
      colimit.ι (MultispanIndex.multispan (diagram (mapGlueData D F))) (WalkingMultispan.right i) =
    ι (mapGlueData D F) i

tactic: rfl
state_before: C : Type u₁
inst✝³ : Category C
C' : Type u₂
inst✝² : Category C'
D : GlueData C
F : C ⥤ C'
H : (i j k : D.J) → PreservesLimit (cospan (f D i j) (f D i k)) F
inst✝¹ : HasMulticoequalizer (diagram D)
inst✝ : PreservesColimit (MultispanIndex.multispan (diagram D)) F
i : D.J
this : HasColimit (MultispanIndex.multispan (diagram (mapGlueData D F)))
⊢ colimit.ι (MultispanIndex.multispan (diagram (mapGlueData D F))) (WalkingMultispan.right i) = ι (mapGlueData D F) i
Theorem: MetricSpace.replaceTopology_eq
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: ext
state_before: α : Type u
β : Type v
X : Type ?u.562731
ι : Type ?u.562734
inst✝¹ : PseudoMetricSpace α
γ✝ : Type w
inst✝ : MetricSpace γ✝
γ : Type u_1
U : TopologicalSpace γ
m : MetricSpace γ
H : U = UniformSpace.toTopologicalSpace
⊢ replaceTopology m H = m

tactic: rfl
state_before: case h.dist.h.h
α : Type u
β : Type v
X : Type ?u.562731
ι : Type ?u.562734
inst✝¹ : PseudoMetricSpace α
γ✝ : Type w
inst✝ : MetricSpace γ✝
γ : Type u_1
U : TopologicalSpace γ
m : MetricSpace γ
H : U = UniformSpace.toTopologicalSpace
x✝¹ x✝ : γ
⊢ dist x✝¹ x✝ = dist x✝¹ x✝
Theorem: Set.mk_preimage_prod_right_fn_eq_if
File: Mathlib/Data/Set/Prod.lean

tactic: rw [← mk_preimage_prod_right_eq_if, prod_preimage_right, preimage_preimage]
state_before: α : Type u_1
β : Type u_3
γ : Type ?u.29816
δ : Type u_2
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
inst✝ : DecidablePred fun x => x ∈ s
g : δ → β
⊢ (fun b => (a, g b)) ⁻¹' s ×ˢ t = if a ∈ s then g ⁻¹' t else ∅
Theorem: Set.unbounded_inter_not
File: Mathlib/Order/Bounded.lean

tactic: simp_rw [← not_bounded_iff, bounded_inter_not H]
state_before: α : Type u_1
r : α → α → Prop
s t : Set α
H : ∀ (a b : α), ∃ m, ∀ (c : α), r c a ∨ r c b → r c m
a : α
⊢ Unbounded r (s ∩ {b | ¬r b a}) ↔ Unbounded r s
Theorem: Set.prod_image_image_eq
File: Mathlib/Data/Set/Prod.lean

tactic: simp [-exists_and_right, exists_and_right.symm, and_left_comm, and_assoc, and_comm]
state_before: α : Type u_3
β : Type u_4
γ : Type u_1
δ : Type u_2
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
m₁ : α → γ
m₂ : β → δ
⊢ ∀ (x : γ × δ), x ∈ (m₁ '' s) ×ˢ (m₂ '' t) ↔ x ∈ (fun p => (m₁ p.fst, m₂ p.snd)) '' s ×ˢ t
Theorem: Nat.zero_mod
File: src/lean/Init/Data/Nat/Div.lean

tactic: rw [mod_eq]
state_before: b : Nat
⊢ 0 % b = 0

tactic: have : ¬ (0 < b ∧ b = 0) := by
  intro ⟨h₁, h₂⟩
  simp_all
state_before: b : Nat
⊢ ite (0 < b ∧ b ≤ 0) ((0 - b) % b) 0 = 0

tactic: simp [this]
state_before: b : Nat
this : ¬(0 < b ∧ b = 0)
⊢ ite (0 < b ∧ b ≤ 0) ((0 - b) % b) 0 = 0

tactic: intro ⟨h₁, h₂⟩
state_before: b : Nat
⊢ ¬(0 < b ∧ b = 0)

tactic: simp_all
state_before: b : Nat
h₁ : 0 < b
h₂ : b = 0
⊢ False
Theorem: MeasurableEmbedding.ae_map_iff
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: simp only [ae_iff, hf.map_apply, preimage_setOf_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1169876
δ : Type ?u.1169879
ι : Type ?u.1169882
R : Type ?u.1169885
R' : Type ?u.1169888
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
hf : MeasurableEmbedding f
p : β → Prop
μ : MeasureTheory.Measure α
⊢ (∀ᵐ (x : β) ∂Measure.map f μ, p x) ↔ ∀ᵐ (x : α) ∂μ, p (f x)
Theorem: Right.sign_neg
File: Mathlib/Data/Sign.lean

tactic: simp_rw [sign_apply, Right.neg_pos_iff, Right.neg_neg_iff]
state_before: α : Type u_1
inst✝³ : AddGroup α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : CovariantClass α α (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1
a : α
⊢ ↑sign (-a) = -↑sign a

tactic: split_ifs with h h'
state_before: α : Type u_1
inst✝³ : AddGroup α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : CovariantClass α α (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1
a : α
⊢ (if a < 0 then 1 else if 0 < a then -1 else 0) = -if 0 < a then 1 else if a < 0 then -1 else 0

tactic: exact False.elim (lt_asymm h h')
state_before: case inl.inl
α : Type u_1
inst✝³ : AddGroup α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : CovariantClass α α (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1
a : α
h : a < 0
h' : 0 < a
⊢ False

tactic: simp
state_before: case inl.inr
α : Type u_1
inst✝³ : AddGroup α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : CovariantClass α α (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1
a : α
h : a < 0
h' : ¬0 < a
⊢ 1 = - -1

tactic: simp
state_before: case inr.inl
α : Type u_1
inst✝³ : AddGroup α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : CovariantClass α α (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1
a : α
h : ¬a < 0
h✝ : 0 < a
⊢ -1 = -1

tactic: simp
state_before: case inr.inr
α : Type u_1
inst✝³ : AddGroup α
inst✝² : Preorder α
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : CovariantClass α α (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1
a : α
h : ¬a < 0
h✝ : ¬0 < a
⊢ 0 = -0
Theorem: Ideal.injective_quotient_le_comap_map
File: Mathlib/RingTheory/Ideal/Over.lean

tactic: refine' quotientMap_injective' (le_of_eq _)
state_before: R : Type u_1
inst✝¹ : CommRing R
S : Type ?u.9808
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ Function.Injective
    ↑(quotientMap (map (mapRingHom (Quotient.mk (comap C P))) P) (mapRingHom (Quotient.mk (comap C P)))
        (_ : P ≤ comap (mapRingHom (Quotient.mk (comap C P))) (map (mapRingHom (Quotient.mk (comap C P))) P)))

tactic: rw [comap_map_of_surjective (mapRingHom (Ideal.Quotient.mk (P.comap (C : R →+* R[X]))))
    (map_surjective (Ideal.Quotient.mk (P.comap (C : R →+* R[X]))) Ideal.Quotient.mk_surjective)]
state_before: R : Type u_1
inst✝¹ : CommRing R
S : Type ?u.9808
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ comap (mapRingHom (Quotient.mk (comap C P))) (map (mapRingHom (Quotient.mk (comap C P))) P) = P

tactic: refine' le_antisymm (sup_le le_rfl _) (le_sup_of_le_left le_rfl)
state_before: R : Type u_1
inst✝¹ : CommRing R
S : Type ?u.9808
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ P ⊔ comap (mapRingHom (Quotient.mk (comap C P))) ⊥ = P

tactic: refine' fun p hp =>
  polynomial_mem_ideal_of_coeff_mem_ideal P p fun n => Ideal.Quotient.eq_zero_iff_mem.mp _
state_before: R : Type u_1
inst✝¹ : CommRing R
S : Type ?u.9808
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ comap (mapRingHom (Quotient.mk (comap C P))) ⊥ ≤ P

tactic: simpa only [coeff_map, coe_mapRingHom] using ext_iff.mp (Ideal.mem_bot.mp (mem_comap.mp hp)) n
state_before: R : Type u_1
inst✝¹ : CommRing R
S : Type ?u.9808
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
p : R[X]
hp : p ∈ comap (mapRingHom (Quotient.mk (comap C P))) ⊥
n : ℕ
⊢ ↑(Quotient.mk (comap C P)) (coeff p n) = 0
Theorem: AlgebraicGeometry.PresheafedSpace.congr_app
File: Mathlib/AlgebraicGeometry/PresheafedSpace.lean

tactic: subst h
state_before: C : Type ?u.133607
inst✝ : Category C
X Y : PresheafedSpace C
α β : X ⟶ Y
h : α = β
U : (Opens ↑↑Y)ᵒᵖ
⊢ (Functor.op (Opens.map β.base)).obj U = (Functor.op (Opens.map α.base)).obj U

tactic: rfl
state_before: C : Type ?u.133607
inst✝ : Category C
X Y : PresheafedSpace C
α : X ⟶ Y
U : (Opens ↑↑Y)ᵒᵖ
⊢ (Functor.op (Opens.map α.base)).obj U = (Functor.op (Opens.map α.base)).obj U

tactic: subst h
state_before: C : Type u_1
inst✝ : Category C
X Y : PresheafedSpace C
α β : X ⟶ Y
h : α = β
U : (Opens ↑↑Y)ᵒᵖ
⊢ α.c.app U =
    β.c.app U ≫
      X.presheaf.map (eqToHom (_ : (Functor.op (Opens.map β.base)).obj U = (Functor.op (Opens.map α.base)).obj U))

tactic: simp
state_before: C : Type u_1
inst✝ : Category C
X Y : PresheafedSpace C
α : X ⟶ Y
U : (Opens ↑↑Y)ᵒᵖ
⊢ α.c.app U =
    α.c.app U ≫
      X.presheaf.map (eqToHom (_ : (Functor.op (Opens.map α.base)).obj U = (Functor.op (Opens.map α.base)).obj U))
Theorem: mul_le_of_le_one_right
File: Mathlib/Algebra/Order/Ring/Lemmas.lean

tactic: simpa only [mul_one] using mul_le_mul_of_nonneg_left h ha
state_before: α : Type u_1
a b c d : α
inst✝³ : MulOneClass α
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
ha : 0 ≤ a
h : b ≤ 1
⊢ a * b ≤ a
Theorem: List.insertNth_length_self
File: Mathlib/Data/List/Basic.lean

tactic: induction' l with hd tl IH
state_before: ι : Type ?u.123580
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a : α
l : List α
x : α
⊢ insertNth (length l) x l = l ++ [x]

tactic: simp
state_before: case nil
ι : Type ?u.123580
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a x : α
⊢ insertNth (length []) x [] = [] ++ [x]

tactic: simpa using IH
state_before: case cons
ι : Type ?u.123580
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a x hd : α
tl : List α
IH : insertNth (length tl) x tl = tl ++ [x]
⊢ insertNth (length (hd :: tl)) x (hd :: tl) = hd :: tl ++ [x]
Theorem: Finsupp.single_eq_of_ne
File: Mathlib/Data/Finsupp/Defs.lean

tactic: classical exact Pi.single_eq_of_ne' h _
state_before: α : Type u_1
β : Type ?u.41282
γ : Type ?u.41285
ι : Type ?u.41288
M : Type u_2
M' : Type ?u.41294
N : Type ?u.41297
P : Type ?u.41300
G : Type ?u.41303
H : Type ?u.41306
R : Type ?u.41309
S : Type ?u.41312
inst✝ : Zero M
a a' : α
b : M
h : a ≠ a'
⊢ ↑(single a b) a' = 0

tactic: exact Pi.single_eq_of_ne' h _
state_before: α : Type u_1
β : Type ?u.41282
γ : Type ?u.41285
ι : Type ?u.41288
M : Type u_2
M' : Type ?u.41294
N : Type ?u.41297
P : Type ?u.41300
G : Type ?u.41303
H : Type ?u.41306
R : Type ?u.41309
S : Type ?u.41312
inst✝ : Zero M
a a' : α
b : M
h : a ≠ a'
⊢ ↑(single a b) a' = 0
Theorem: MeasureTheory.Measure.bind_zero_right
File: Mathlib/MeasureTheory/Measure/GiryMonad.lean

tactic: ext1 s hs
state_before: α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure α
⊢ bind m 0 = 0

tactic: simp only [bind, hs, join_apply, coe_zero, Pi.zero_apply]
state_before: case h
α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure α
s : Set β
hs : MeasurableSet s
⊢ ↑↑(bind m 0) s = ↑↑0 s

tactic: rw [lintegral_map (measurable_coe hs) measurable_zero]
state_before: case h
α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure α
s : Set β
hs : MeasurableSet s
⊢ (∫⁻ (μ : Measure β), ↑↑μ s ∂map 0 m) = 0

tactic: simp only [Pi.zero_apply, coe_zero, lintegral_const, MulZeroClass.zero_mul]
state_before: case h
α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure α
s : Set β
hs : MeasurableSet s
⊢ (∫⁻ (a : α), ↑↑(OfNat.ofNat 0 a) s ∂m) = 0
Theorem: Option.bex_ne_none
File: Std/Data/Option/Lemmas.lean

tactic: rwa [some_get]
state_before: α : Type u_1
p : Option α → Prop
x✝ : ∃ x x_1, p x
x : Option α
hx : x ≠ none
hp : p x
⊢ p (some (get x (_ : isSome x = true)))
Theorem: Set.projIcc_eq_right
File: Mathlib/Data/Set/Intervals/ProjIcc.lean

tactic: refine' ⟨fun h' => _, projIcc_of_right_le _⟩
state_before: α : Type u_1
β : Type ?u.4931
inst✝ : LinearOrder α
a b : α
h✝ : a ≤ b
x : α
h : a < b
⊢ projIcc a b (_ : a ≤ b) x = { val := b, property := (_ : b ∈ Icc a b) } ↔ b ≤ x

tactic: simp_rw [Subtype.ext_iff_val, projIcc] at h'
state_before: α : Type u_1
β : Type ?u.4931
inst✝ : LinearOrder α
a b : α
h✝ : a ≤ b
x : α
h : a < b
h' : projIcc a b (_ : a ≤ b) x = { val := b, property := (_ : b ∈ Icc a b) }
⊢ b ≤ x

tactic: have := ((max_choice _ _).resolve_left (by simp [h.ne', h'])).symm.trans h'
state_before: α : Type u_1
β : Type ?u.4931
inst✝ : LinearOrder α
a b : α
h✝ : a ≤ b
x : α
h : a < b
h' : max a (min b x) = b
⊢ b ≤ x

tactic: exact min_eq_left_iff.mp this
state_before: α : Type u_1
β : Type ?u.4931
inst✝ : LinearOrder α
a b : α
h✝ : a ≤ b
x : α
h : a < b
h' : max a (min b x) = b
this : min b x = b
⊢ b ≤ x

tactic: simp [h.ne', h']
state_before: α : Type u_1
β : Type ?u.4931
inst✝ : LinearOrder α
a b : α
h✝ : a ≤ b
x : α
h : a < b
h' : max a (min b x) = b
⊢ ¬max a (min b x) = a
Theorem: Function.Commute.iterate_eq_of_map_eq
File: Mathlib/Logic/Function/Iterate.lean

tactic: simp only [iterate_succ_apply, hx, (h.iterate_left n).eq, ihn, ((refl g).iterate_right n).eq]
state_before: α : Type u
β : Type v
f g : α → α
h : Commute f g
n✝ : ℕ
x : α
hx : f x = g x
n : ℕ
ihn : (f^[n]) x = (g^[n]) x
⊢ (f^[Nat.succ n]) x = (g^[Nat.succ n]) x
Theorem: List.countp_eq_length_filter
File: Mathlib/Data/List/Count.lean

tactic: induction' l with x l ih
state_before: α : Type u_1
l✝ : List α
p q : α → Bool
l : List α
⊢ countp p l = length (filter p l)

tactic: by_cases h : p x
state_before: case cons
α : Type u_1
l✝ : List α
p q : α → Bool
x : α
l : List α
ih : countp p l = length (filter p l)
⊢ countp p (x :: l) = length (filter p (x :: l))

tactic: rfl
state_before: case nil
α : Type u_1
l : List α
p q : α → Bool
⊢ countp p [] = length (filter p [])

tactic: rw [countp_cons_of_pos p l h, ih, filter_cons_of_pos l h, length]
state_before: case pos
α : Type u_1
l✝ : List α
p q : α → Bool
x : α
l : List α
ih : countp p l = length (filter p l)
h : p x = true
⊢ countp p (x :: l) = length (filter p (x :: l))

tactic: rw [countp_cons_of_neg p l h, ih, filter_cons_of_neg l h]
state_before: case neg
α : Type u_1
l✝ : List α
p q : α → Bool
x : α
l : List α
ih : countp p l = length (filter p l)
h : ¬p x = true
⊢ countp p (x :: l) = length (filter p (x :: l))