tasksource/leandojo huggingface dataset:
Theorem: MeasureTheory.Measure.restrict_toMeasurable
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [restrict_apply ht, restrict_apply ht, inter_comm, measure_toMeasurable_inter ht h,
  inter_comm]
state_before: α : Type u_1
β : Type ?u.306428
γ : Type ?u.306431
δ : Type ?u.306434
ι : Type ?u.306437
R : Type ?u.306440
R' : Type ?u.306443
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t✝ : Set α
h : ↑↑μ s ≠ ⊤
t : Set α
ht : MeasurableSet t
⊢ ↑↑(restrict μ (toMeasurable μ s)) t = ↑↑(restrict μ s) t
Theorem: Set.Infinite.exists_subset_ncard_eq
File: Mathlib/Data/Set/Ncard.lean

tactic: have := hs.to_subtype
state_before: α : Type u_1
β : Type ?u.133509
s✝ t : Set α
a b x y : α
f : α → β
s : Set α
hs : Set.Infinite s
k : ℕ
⊢ ∃ t, t ⊆ s ∧ Set.Finite t ∧ Set.ncard t = k

tactic: obtain ⟨t', -, rfl⟩ := @Infinite.exists_subset_card_eq s univ infinite_univ k
state_before: α : Type u_1
β : Type ?u.133509
s✝ t : Set α
a b x y : α
f : α → β
s : Set α
hs : Set.Infinite s
k : ℕ
this : Infinite ↑s
⊢ ∃ t, t ⊆ s ∧ Set.Finite t ∧ Set.ncard t = k

tactic: refine' ⟨Subtype.val '' (t' : Set s), by simp, Finite.image _ (by simp), _⟩
state_before: case intro.intro
α : Type u_1
β : Type ?u.133509
s✝ t : Set α
a b x y : α
f : α → β
s : Set α
hs : Set.Infinite s
this : Infinite ↑s
t' : Finset ↑s
⊢ ∃ t, t ⊆ s ∧ Set.Finite t ∧ Set.ncard t = Finset.card t'

tactic: rw [ncard_image_ofInjective _ Subtype.coe_injective]
state_before: case intro.intro
α : Type u_1
β : Type ?u.133509
s✝ t : Set α
a b x y : α
f : α → β
s : Set α
hs : Set.Infinite s
this : Infinite ↑s
t' : Finset ↑s
⊢ Set.ncard (Subtype.val '' ↑t') = Finset.card t'

tactic: simp
state_before: case intro.intro
α : Type u_1
β : Type ?u.133509
s✝ t : Set α
a b x y : α
f : α → β
s : Set α
hs : Set.Infinite s
this : Infinite ↑s
t' : Finset ↑s
⊢ Set.ncard ↑t' = Finset.card t'

tactic: simp
state_before: α : Type u_1
β : Type ?u.133509
s✝ t : Set α
a b x y : α
f : α → β
s : Set α
hs : Set.Infinite s
this : Infinite ↑s
t' : Finset ↑s
⊢ Subtype.val '' ↑t' ⊆ s

tactic: simp
state_before: α : Type u_1
β : Type ?u.133509
s✝ t : Set α
a b x y : α
f : α → β
s : Set α
hs : Set.Infinite s
this : Infinite ↑s
t' : Finset ↑s
⊢ Set.Finite ↑t'
Theorem: CategoryTheory.hasCoproduct_fin
File: Mathlib/CategoryTheory/Limits/Constructions/FiniteProductsOfBinaryProducts.lean

tactic: letI : HasColimitsOfShape (Discrete (Fin 0)) C :=
  hasColimitsOfShape_of_equivalence (Discrete.equivalence.{0} finZeroEquiv'.symm)
state_before: J : Type v
inst✝⁴ : SmallCategory J
C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
f : Fin 0 → C
⊢ HasCoproduct f

tactic: infer_instance
state_before: J : Type v
inst✝⁴ : SmallCategory J
C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
f : Fin 0 → C
this : HasColimitsOfShape (Discrete (Fin 0)) C :=
  hasColimitsOfShape_of_equivalence (Discrete.equivalence finZeroEquiv'.symm)
⊢ HasCoproduct f

tactic: haveI := hasCoproduct_fin n
state_before: J : Type v
inst✝⁴ : SmallCategory J
C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
n : ℕ
f : Fin (n + 1) → C
⊢ HasCoproduct f

tactic: apply
  HasColimit.mk ⟨_, extendCofanIsColimit f (colimit.isColimit _) (colimit.isColimit _)⟩
state_before: J : Type v
inst✝⁴ : SmallCategory J
C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
n : ℕ
f : Fin (n + 1) → C
this : ∀ (f : Fin n → C), HasCoproduct f
⊢ HasCoproduct f
Theorem: measurableSet_range_inr
File: Mathlib/MeasureTheory/MeasurableSpace.lean

tactic: rw [← image_univ]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.378457
δ : Type ?u.378460
δ' : Type ?u.378463
ι : Sort uι
s t u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSpace α
⊢ MeasurableSet (range Sum.inr)

tactic: exact MeasurableSet.univ.inr_image
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.378457
δ : Type ?u.378460
δ' : Type ?u.378463
ι : Sort uι
s t u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSpace α
⊢ MeasurableSet (Sum.inr '' univ)
Theorem: Ideal.Quotient.factor_comp_mk
File: Mathlib/RingTheory/Ideal/Quotient.lean

tactic: ext x
state_before: R : Type u
inst✝¹ : CommRing R
I : Ideal R
a b : R
S✝ : Type v
x y : R
inst✝ : CommRing S✝
S T : Ideal R
H : S ≤ T
⊢ RingHom.comp (factor S T H) (mk S) = mk T

tactic: rw [RingHom.comp_apply, factor_mk]
state_before: case a
R : Type u
inst✝¹ : CommRing R
I : Ideal R
a b : R
S✝ : Type v
x✝ y : R
inst✝ : CommRing S✝
S T : Ideal R
H : S ≤ T
x : R
⊢ ↑(RingHom.comp (factor S T H) (mk S)) x = ↑(mk T) x
Theorem: CategoryTheory.Abelian.Exact.op_iff
File: Mathlib/CategoryTheory/Abelian/Exact.lean

tactic: rw [← IsEquivalence.exact_iff _ _ (opOpEquivalence C).inverse]
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
e : Exact g.op f.op
⊢ Exact f g

tactic: exact Exact.op _ _ e
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
e : Exact g.op f.op
⊢ Exact ((opOpEquivalence C).inverse.map f) ((opOpEquivalence C).inverse.map g)
Theorem: Set.ssubset_iff_insert
File: Mathlib/Data/Set/Basic.lean

tactic: simp only [insert_subset, exists_and_right, ssubset_def, not_subset]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t✝ t₁ t₂ u s t : Set α
⊢ s ⊂ t ↔ ∃ a x, insert a s ⊆ t

tactic: simp only [exists_prop, and_comm]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t✝ t₁ t₂ u s t : Set α
⊢ (s ⊆ t ∧ ∃ a, a ∈ t ∧ ¬a ∈ s) ↔ (∃ x x_1, x ∈ t) ∧ s ⊆ t
Theorem: le_iff_eq_sup_sdiff
File: Mathlib/Order/BooleanAlgebra.lean

tactic: apply le_antisymm
state_before: α : Type u
β : Type ?u.15123
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ≤ z
⊢ y = z ⊔ y \ x

tactic: conv_lhs => rw [← sup_inf_sdiff y x]
state_before: case a
α : Type u
β : Type ?u.15123
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ≤ z
⊢ y ≤ z ⊔ y \ x

tactic: apply sup_le_sup_right
state_before: case a
α : Type u
β : Type ?u.15123
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ≤ z
⊢ y ⊓ x ⊔ y \ x ≤ z ⊔ y \ x

tactic: rwa [inf_eq_right.2 hx]
state_before: case a.h₁
α : Type u
β : Type ?u.15123
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ≤ z
⊢ y ⊓ x ≤ z

tactic: apply le_trans
state_before: case a
α : Type u
β : Type ?u.15123
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ≤ z
⊢ z ⊔ y \ x ≤ y

tactic: apply sup_le_sup_right hz
state_before: case a.a
α : Type u
β : Type ?u.15123
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ≤ z
⊢ z ⊔ y \ x ≤ ?a.b✝

tactic: rw [sup_sdiff_left]
state_before: case a.a
α : Type u
β : Type ?u.15123
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ≤ z
⊢ y ⊔ y \ x ≤ y

tactic: conv_lhs at H => rw [← sup_sdiff_cancel_right hx]
state_before: α : Type u
β : Type ?u.15123
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : y = z ⊔ y \ x
⊢ x ≤ z

tactic: refine' le_of_inf_le_sup_le _ H.le
state_before: α : Type u
β : Type ?u.15123
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ⊔ y \ x = z ⊔ y \ x
⊢ x ≤ z

tactic: rw [inf_sdiff_self_right]
state_before: α : Type u
β : Type ?u.15123
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ⊔ y \ x = z ⊔ y \ x
⊢ x ⊓ y \ x ≤ z ⊓ y \ x

tactic: exact bot_le
state_before: α : Type u
β : Type ?u.15123
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hz : z ≤ y
hx : x ≤ y
H : x ⊔ y \ x = z ⊔ y \ x
⊢ ⊥ ≤ z ⊓ y \ x
Theorem: BoxIntegral.Box.subbox_induction_on
File: Mathlib/Analysis/BoxIntegral/Partition/SubboxInduction.lean

tactic: refine' subbox_induction_on' I (fun J hle hs => H_ind J hle fun J' h' => _) H_nhds
state_before: ι : Type u_1
inst✝ : Fintype ι
I✝ J : Box ι
p : Box ι → Prop
I : Box ι
H_ind : ∀ (J : Box ι), J ≤ I → (∀ (J' : Box ι), J' ∈ splitCenter J → p J') → p J
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
⊢ p I

tactic: rcases mem_splitCenter.1 h' with ⟨s, rfl⟩
state_before: ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_ind : ∀ (J : Box ι), J ≤ I → (∀ (J' : Box ι), J' ∈ splitCenter J → p J') → p J
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : Box ι
hle : J ≤ I
hs : ∀ (s : Set ι), p (splitCenterBox J s)
J' : Box ι
h' : J' ∈ splitCenter J
⊢ p J'

tactic: exact hs s
state_before: case intro
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_ind : ∀ (J : Box ι), J ≤ I → (∀ (J' : Box ι), J' ∈ splitCenter J → p J') → p J
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : Box ι
hle : J ≤ I
hs : ∀ (s : Set ι), p (splitCenterBox J s)
s : Set ι
h' : splitCenterBox J s ∈ splitCenter J
⊢ p (splitCenterBox J s)
Theorem: EMetric.preimage_smul_ball
File: Mathlib/Topology/MetricSpace/IsometricSMul.lean

tactic: rw [preimage_smul, smul_ball]
state_before: M : Type u
G : Type v
X : Type w
inst✝³ : PseudoEMetricSpace X
inst✝² : Group G
inst✝¹ : MulAction G X
inst✝ : IsometricSMul G X
c : G
x : X
r : ℝ≥0∞
⊢ (fun x x_1 => x • x_1) c ⁻¹' ball x r = ball (c⁻¹ • x) r
Theorem: Basis.adjustToOrientation_apply_eq_or_eq_neg
File: Mathlib/LinearAlgebra/Orientation.lean

tactic: rw [adjustToOrientation]
state_before: R : Type u_1
inst✝⁶ : LinearOrderedCommRing R
M : Type u_3
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
ι : Type u_2
inst✝³ : Fintype ι
inst✝² : DecidableEq ι
inst✝¹ : Nontrivial R
inst✝ : Nonempty ι
e : Basis ι R M
x : Orientation R M ι
i : ι
⊢ ↑(adjustToOrientation e x) i = ↑e i ∨ ↑(adjustToOrientation e x) i = -↑e i

tactic: split_ifs with h
state_before: R : Type u_1
inst✝⁶ : LinearOrderedCommRing R
M : Type u_3
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
ι : Type u_2
inst✝³ : Fintype ι
inst✝² : DecidableEq ι
inst✝¹ : Nontrivial R
inst✝ : Nonempty ι
e : Basis ι R M
x : Orientation R M ι
i : ι
⊢ ↑(if Basis.orientation e = x then e else unitsSMul e (Function.update 1 (Classical.arbitrary ι) (-1))) i = ↑e i ∨
    ↑(if Basis.orientation e = x then e else unitsSMul e (Function.update 1 (Classical.arbitrary ι) (-1))) i = -↑e i

tactic: simp
state_before: case inl
R : Type u_1
inst✝⁶ : LinearOrderedCommRing R
M : Type u_3
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
ι : Type u_2
inst✝³ : Fintype ι
inst✝² : DecidableEq ι
inst✝¹ : Nontrivial R
inst✝ : Nonempty ι
e : Basis ι R M
x : Orientation R M ι
i : ι
h : Basis.orientation e = x
⊢ ↑e i = ↑e i ∨ ↑e i = -↑e i

tactic: by_cases hi : i = Classical.arbitrary ι <;> simp [unitsSMul_apply, hi]
state_before: case inr
R : Type u_1
inst✝⁶ : LinearOrderedCommRing R
M : Type u_3
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
ι : Type u_2
inst✝³ : Fintype ι
inst✝² : DecidableEq ι
inst✝¹ : Nontrivial R
inst✝ : Nonempty ι
e : Basis ι R M
x : Orientation R M ι
i : ι
h : ¬Basis.orientation e = x
⊢ ↑(unitsSMul e (Function.update 1 (Classical.arbitrary ι) (-1))) i = ↑e i ∨
    ↑(unitsSMul e (Function.update 1 (Classical.arbitrary ι) (-1))) i = -↑e i
Theorem: Filter.principal_isMeasurablyGenerated_iff
File: Mathlib/MeasureTheory/MeasurableSpace.lean

tactic: refine' ⟨_, fun hs => ⟨fun t ht => ⟨s, mem_principal_self s, hs, ht⟩⟩⟩
state_before: α : Type u_1
β : Type ?u.900188
γ : Type ?u.900191
δ : Type ?u.900194
δ' : Type ?u.900197
ι : Sort uι
s✝ t u : Set α
inst✝ : MeasurableSpace α
s : Set α
⊢ IsMeasurablyGenerated (𝓟 s) ↔ MeasurableSet s

tactic: rintro ⟨hs⟩
state_before: α : Type u_1
β : Type ?u.900188
γ : Type ?u.900191
δ : Type ?u.900194
δ' : Type ?u.900197
ι : Sort uι
s✝ t u : Set α
inst✝ : MeasurableSpace α
s : Set α
⊢ IsMeasurablyGenerated (𝓟 s) → MeasurableSet s

tactic: rcases hs (mem_principal_self s) with ⟨t, ht, htm, hts⟩
state_before: case mk
α : Type u_1
β : Type ?u.900188
γ : Type ?u.900191
δ : Type ?u.900194
δ' : Type ?u.900197
ι : Sort uι
s✝ t u : Set α
inst✝ : MeasurableSpace α
s : Set α
hs : ∀ ⦃s_1 : Set α⦄, s_1 ∈ 𝓟 s → ∃ t, t ∈ 𝓟 s ∧ MeasurableSet t ∧ t ⊆ s_1
⊢ MeasurableSet s

tactic: have : t = s := hts.antisymm ht
state_before: case mk.intro.intro.intro
α : Type u_1
β : Type ?u.900188
γ : Type ?u.900191
δ : Type ?u.900194
δ' : Type ?u.900197
ι : Sort uι
s✝ t✝ u : Set α
inst✝ : MeasurableSpace α
s : Set α
hs : ∀ ⦃s_1 : Set α⦄, s_1 ∈ 𝓟 s → ∃ t, t ∈ 𝓟 s ∧ MeasurableSet t ∧ t ⊆ s_1
t : Set α
ht : t ∈ 𝓟 s
htm : MeasurableSet t
hts : t ⊆ s
⊢ MeasurableSet s

tactic: rwa [← this]
state_before: case mk.intro.intro.intro
α : Type u_1
β : Type ?u.900188
γ : Type ?u.900191
δ : Type ?u.900194
δ' : Type ?u.900197
ι : Sort uι
s✝ t✝ u : Set α
inst✝ : MeasurableSpace α
s : Set α
hs : ∀ ⦃s_1 : Set α⦄, s_1 ∈ 𝓟 s → ∃ t, t ∈ 𝓟 s ∧ MeasurableSet t ∧ t ⊆ s_1
t : Set α
ht : t ∈ 𝓟 s
htm : MeasurableSet t
hts : t ⊆ s
this : t = s
⊢ MeasurableSet s
Theorem: Polynomial.map_map
File: Mathlib/Data/Polynomial/Eval.lean

tactic: simp [coeff_map]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝² : Semiring R
p✝ q r : R[X]
inst✝¹ : Semiring S
f : R →+* S
inst✝ : Semiring T
g : S →+* T
p : R[X]
⊢ ∀ (n : ℕ), coeff (map g (map f p)) n = coeff (map (RingHom.comp g f) p) n
Theorem: Set.preimage_const_mul_Ici_of_neg
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simpa only [mul_comm] using preimage_mul_const_Ici_of_neg a h
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ a c : α
h : c < 0
⊢ (fun x x_1 => x * x_1) c ⁻¹' Ici a = Iic (a / c)
Theorem: AddCommGroupCat.kernelIsoKer_inv_comp_ι
File: Mathlib/Algebra/Category/GroupCat/Limits.lean

tactic: ext
state_before: J : Type v
inst✝ : SmallCategory J
G H : AddCommGroupCat
f : G ⟶ H
⊢ (kernelIsoKer f).inv ≫ kernel.ι f = AddSubgroup.subtype (AddMonoidHom.ker f)

tactic: simp [kernelIsoKer]
state_before: case w
J : Type v
inst✝ : SmallCategory J
G H : AddCommGroupCat
f : G ⟶ H
x✝ : ↑(of { x // x ∈ AddMonoidHom.ker f })
⊢ ↑((kernelIsoKer f).inv ≫ kernel.ι f) x✝ = ↑(AddSubgroup.subtype (AddMonoidHom.ker f)) x✝
Theorem: Denumerable.raise_lower'
File: Mathlib/Logic/Equiv/List.lean

tactic: have : n ≤ m := h₁ _ (l.mem_cons_self _)
state_before: α : Type ?u.58427
β : Type ?u.58430
inst✝¹ : Denumerable α
inst✝ : Denumerable β
m : ℕ
l : List ℕ
n : ℕ
h₁ : ∀ (m_1 : ℕ), m_1 ∈ m :: l → n ≤ m_1
h₂ : Sorted (fun x x_1 => x < x_1) (m :: l)
⊢ raise' (lower' (m :: l) n) n = m :: l

tactic: simp [raise', lower', tsub_add_cancel_of_le this,
  raise_lower' (List.rel_of_sorted_cons h₂ : ∀ a ∈ l, m < a) h₂.of_cons]
state_before: α : Type ?u.58427
β : Type ?u.58430
inst✝¹ : Denumerable α
inst✝ : Denumerable β
m : ℕ
l : List ℕ
n : ℕ
h₁ : ∀ (m_1 : ℕ), m_1 ∈ m :: l → n ≤ m_1
h₂ : Sorted (fun x x_1 => x < x_1) (m :: l)
this : n ≤ m
⊢ raise' (lower' (m :: l) n) n = m :: l
Theorem: Mathlib.Tactic.Ring.add_pf_add_overlap_zero
File: Mathlib/Tactic/Ring/Basic.lean

tactic: subst_vars
state_before: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a₁ b₁ a₂ b₂ c : R
h : IsNat (a₁ + b₁) 0
h₄ : a₂ + b₂ = c
⊢ a₁ + a₂ + (b₁ + b₂) = c

tactic: rw [add_add_add_comm, h.1, Nat.cast_zero, add_pf_zero_add]
state_before: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a₁ b₁ a₂ b₂ : R
h : IsNat (a₁ + b₁) 0
⊢ a₁ + a₂ + (b₁ + b₂) = a₂ + b₂
Theorem: Zspan.vadd_mem_fundamentalDomain
File: Mathlib/Algebra/Module/Zlattice.lean

tactic: rw [Subtype.ext_iff, ← add_right_inj x, AddSubgroupClass.coe_neg, ← sub_eq_add_neg, ← fract_apply,
  ← fract_zspan_add b _ (Subtype.mem y), add_comm, ← vadd_eq_add, ← vadd_def, eq_comm, ←
  fract_eq_self]
state_before: E : Type u_2
ι : Type u_1
K : Type u_3
inst✝⁴ : NormedLinearOrderedField K
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace K E
b : Basis ι K E
inst✝¹ : FloorRing K
inst✝ : Fintype ι
y : { x // x ∈ span ℤ (Set.range ↑b) }
x : E
⊢ y +ᵥ x ∈ fundamentalDomain b ↔ y = -floor b x
Theorem: CategoryTheory.Limits.PreservesKernel.iso_hom
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Kernels.lean

tactic: rw [← cancel_mono (kernel.ι _)]
state_before: C : Type u₁
inst✝⁷ : Category C
inst✝⁶ : HasZeroMorphisms C
D : Type u₂
inst✝⁵ : Category D
inst✝⁴ : HasZeroMorphisms D
G : C ⥤ D
inst✝³ : Functor.PreservesZeroMorphisms G
X Y Z : C
f : X ⟶ Y
h : Z ⟶ X
w : h ≫ f = 0
inst✝² : HasKernel f
inst✝¹ : HasKernel (G.map f)
inst✝ : PreservesLimit (parallelPair f 0) G
⊢ (iso G f).hom = kernelComparison f G

tactic: simp [PreservesKernel.iso]
state_before: C : Type u₁
inst✝⁷ : Category C
inst✝⁶ : HasZeroMorphisms C
D : Type u₂
inst✝⁵ : Category D
inst✝⁴ : HasZeroMorphisms D
G : C ⥤ D
inst✝³ : Functor.PreservesZeroMorphisms G
X Y Z : C
f : X ⟶ Y
h : Z ⟶ X
w : h ≫ f = 0
inst✝² : HasKernel f
inst✝¹ : HasKernel (G.map f)
inst✝ : PreservesLimit (parallelPair f 0) G
⊢ (iso G f).hom ≫ kernel.ι (G.map f) = kernelComparison f G ≫ kernel.ι (G.map f)
Theorem: Cardinal.mul_eq_max'
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: rcases aleph0_le_mul_iff.mp h with ⟨ha, hb, ha' | hb'⟩
state_before: a b : Cardinal
h : ℵ₀ ≤ a * b
⊢ a * b = max a b

tactic: exact mul_eq_max_of_aleph0_le_left ha' hb
state_before: case intro.intro.inl
a b : Cardinal
h : ℵ₀ ≤ a * b
ha : a ≠ 0
hb : b ≠ 0
ha' : ℵ₀ ≤ a
⊢ a * b = max a b

tactic: exact mul_eq_max_of_aleph0_le_right ha hb'
state_before: case intro.intro.inr
a b : Cardinal
h : ℵ₀ ≤ a * b
ha : a ≠ 0
hb : b ≠ 0
hb' : ℵ₀ ≤ b
⊢ a * b = max a b
Theorem: Subgroup.equivMapOfInjective_coe_mulEquiv
File: Mathlib/GroupTheory/Subgroup/Basic.lean

tactic: ext
state_before: G : Type u_1
G' : Type u_2
inst✝³ : Group G
inst✝² : Group G'
A : Type ?u.690834
inst✝¹ : AddGroup A
N : Type ?u.690840
inst✝ : Group N
H : Subgroup G
e : G ≃* G'
⊢ equivMapOfInjective H ↑e (_ : Injective ↑e) = MulEquiv.subgroupMap e H

tactic: rfl
state_before: case h.a
G : Type u_1
G' : Type u_2
inst✝³ : Group G
inst✝² : Group G'
A : Type ?u.690834
inst✝¹ : AddGroup A
N : Type ?u.690840
inst✝ : Group N
H : Subgroup G
e : G ≃* G'
x✝ : { x // x ∈ H }
⊢ ↑(↑(equivMapOfInjective H ↑e (_ : Injective ↑e)) x✝) = ↑(↑(MulEquiv.subgroupMap e H) x✝)
Theorem: partialSups_le
File: Mathlib/Order/PartialSups.lean

tactic: induction' n with n ih
state_before: α : Type u_1
inst✝ : SemilatticeSup α
f : ℕ → α
n : ℕ
a : α
w : ∀ (m : ℕ), m ≤ n → f m ≤ a
⊢ ↑(partialSups f) n ≤ a

tactic: apply w 0 le_rfl
state_before: case zero
α : Type u_1
inst✝ : SemilatticeSup α
f : ℕ → α
n : ℕ
a : α
w✝ : ∀ (m : ℕ), m ≤ n → f m ≤ a
w : ∀ (m : ℕ), m ≤ Nat.zero → f m ≤ a
⊢ ↑(partialSups f) Nat.zero ≤ a

tactic: exact sup_le (ih fun m p => w m (Nat.le_succ_of_le p)) (w (n + 1) le_rfl)
state_before: case succ
α : Type u_1
inst✝ : SemilatticeSup α
f : ℕ → α
n✝ : ℕ
a : α
w✝ : ∀ (m : ℕ), m ≤ n✝ → f m ≤ a
n : ℕ
ih : (∀ (m : ℕ), m ≤ n → f m ≤ a) → ↑(partialSups f) n ≤ a
w : ∀ (m : ℕ), m ≤ Nat.succ n → f m ≤ a
⊢ ↑(partialSups f) (Nat.succ n) ≤ a
Theorem: Cardinal.lift_sSup
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: apply ((le_csSup_iff' (bddAbove_image.{_,u} _ hs)).2 fun c hc => _).antisymm (csSup_le' _)
state_before: α β : Type u
s : Set Cardinal
hs : BddAbove s
⊢ lift (sSup s) = sSup (lift '' s)

tactic: intro c hc
state_before: α β : Type u
s : Set Cardinal
hs : BddAbove s
⊢ ∀ (c : Cardinal), c ∈ upperBounds (lift '' s) → lift (sSup s) ≤ c

tactic: by_contra h
state_before: α β : Type u
s : Set Cardinal
hs : BddAbove s
c : Cardinal
hc : c ∈ upperBounds (lift '' s)
⊢ lift (sSup s) ≤ c

tactic: obtain ⟨d, rfl⟩ := Cardinal.lift_down (not_le.1 h).le
state_before: α β : Type u
s : Set Cardinal
hs : BddAbove s
c : Cardinal
hc : c ∈ upperBounds (lift '' s)
h : ¬lift (sSup s) ≤ c
⊢ False

tactic: simp_rw [lift_le] at h hc
state_before: case intro
α β : Type u
s : Set Cardinal
hs : BddAbove s
d : Cardinal
hc : lift d ∈ upperBounds (lift '' s)
h : ¬lift (sSup s) ≤ lift d
⊢ False

tactic: rw [csSup_le_iff' hs] at h
state_before: case intro
α β : Type u
s : Set Cardinal
hs : BddAbove s
d : Cardinal
hc : lift d ∈ upperBounds (lift '' s)
h : ¬sSup s ≤ d
⊢ False

tactic: exact h fun a ha => lift_le.1 <| hc (mem_image_of_mem _ ha)
state_before: case intro
α β : Type u
s : Set Cardinal
hs : BddAbove s
d : Cardinal
hc : lift d ∈ upperBounds (lift '' s)
h : ¬∀ (x : Cardinal), x ∈ s → x ≤ d
⊢ False

tactic: rintro i ⟨j, hj, rfl⟩
state_before: α β : Type u
s : Set Cardinal
hs : BddAbove s
⊢ lift (sSup s) ∈ upperBounds (lift '' s)

tactic: exact lift_le.2 (le_csSup hs hj)
state_before: case intro.intro
α β : Type u
s : Set Cardinal
hs : BddAbove s
j : Cardinal
hj : j ∈ s
⊢ lift j ≤ lift (sSup s)
Theorem: Polynomial.iterate_derivative_smul
File: Mathlib/Data/Polynomial/Derivative.lean

tactic: induction' k with k ih generalizing p
state_before: R : Type u
S✝ : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝³ : Semiring R
S : Type u_1
inst✝² : Monoid S
inst✝¹ : DistribMulAction S R
inst✝ : IsScalarTower S R R
s : S
p : R[X]
k : ℕ
⊢ (↑derivative^[k]) (s • p) = s • (↑derivative^[k]) p

tactic: simp
state_before: case zero
R : Type u
S✝ : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝³ : Semiring R
S : Type u_1
inst✝² : Monoid S
inst✝¹ : DistribMulAction S R
inst✝ : IsScalarTower S R R
s : S
p✝ p : R[X]
⊢ (↑derivative^[Nat.zero]) (s • p) = s • (↑derivative^[Nat.zero]) p

tactic: simp [ih]
state_before: case succ
R : Type u
S✝ : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝³ : Semiring R
S : Type u_1
inst✝² : Monoid S
inst✝¹ : DistribMulAction S R
inst✝ : IsScalarTower S R R
s : S
p✝ : R[X]
k : ℕ
ih : ∀ (p : R[X]), (↑derivative^[k]) (s • p) = s • (↑derivative^[k]) p
p : R[X]
⊢ (↑derivative^[Nat.succ k]) (s • p) = s • (↑derivative^[Nat.succ k]) p