tasksource/leandojo huggingface dataset:
Theorem: Finmap.union_cancel
File: Mathlib/Data/Finmap.lean

tactic: apply ext_lookup
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : Disjoint s₁ s₃
h' : Disjoint s₂ s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
⊢ s₁ = s₂

tactic: intro x
state_before: case a
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : Disjoint s₁ s₃
h' : Disjoint s₂ s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
⊢ ∀ (x : α), lookup x s₁ = lookup x s₂

tactic: have : (s₁ ∪ s₃).lookup x = (s₂ ∪ s₃).lookup x := h'' ▸ rfl
state_before: case a
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : Disjoint s₁ s₃
h' : Disjoint s₂ s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
x : α
⊢ lookup x s₁ = lookup x s₂

tactic: by_cases hs₁ : x ∈ s₁
state_before: case a
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : Disjoint s₁ s₃
h' : Disjoint s₂ s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
x : α
this : lookup x (s₁ ∪ s₃) = lookup x (s₂ ∪ s₃)
⊢ lookup x s₁ = lookup x s₂

tactic: rwa [lookup_union_left hs₁, lookup_union_left_of_not_in (h _ hs₁)] at this
state_before: case pos
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : Disjoint s₁ s₃
h' : Disjoint s₂ s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
x : α
this : lookup x (s₁ ∪ s₃) = lookup x (s₂ ∪ s₃)
hs₁ : x ∈ s₁
⊢ lookup x s₁ = lookup x s₂

tactic: by_cases hs₂ : x ∈ s₂
state_before: case neg
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : Disjoint s₁ s₃
h' : Disjoint s₂ s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
x : α
this : lookup x (s₁ ∪ s₃) = lookup x (s₂ ∪ s₃)
hs₁ : ¬x ∈ s₁
⊢ lookup x s₁ = lookup x s₂

tactic: rwa [lookup_union_left_of_not_in (h' _ hs₂), lookup_union_left hs₂] at this
state_before: case pos
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : Disjoint s₁ s₃
h' : Disjoint s₂ s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
x : α
this : lookup x (s₁ ∪ s₃) = lookup x (s₂ ∪ s₃)
hs₁ : ¬x ∈ s₁
hs₂ : x ∈ s₂
⊢ lookup x s₁ = lookup x s₂

tactic: rw [lookup_eq_none.mpr hs₁, lookup_eq_none.mpr hs₂]
state_before: case neg
α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ : Finmap β
h : Disjoint s₁ s₃
h' : Disjoint s₂ s₃
h'' : s₁ ∪ s₃ = s₂ ∪ s₃
x : α
this : lookup x (s₁ ∪ s₃) = lookup x (s₂ ∪ s₃)
hs₁ : ¬x ∈ s₁
hs₂ : ¬x ∈ s₂
⊢ lookup x s₁ = lookup x s₂
Theorem: SimpleGraph.colorable_chromaticNumber_of_fintype
File: Mathlib/Combinatorics/SimpleGraph/Coloring.lean

tactic: cases nonempty_fintype V
state_before: V : Type u
G✝ : SimpleGraph V
α : Type v
C : Coloring G✝ α
G : SimpleGraph V
inst✝ : Finite V
⊢ Colorable G (chromaticNumber G)

tactic: exact colorable_chromaticNumber G.colorable_of_fintype
state_before: case intro
V : Type u
G✝ : SimpleGraph V
α : Type v
C : Coloring G✝ α
G : SimpleGraph V
inst✝ : Finite V
val✝ : Fintype V
⊢ Colorable G (chromaticNumber G)
Theorem: MeasureTheory.IsFundamentalDomain.mk'
File: Mathlib/MeasureTheory/Group/FundamentalDomain.lean

tactic: rw [mem_smul_set_iff_inv_smul_mem] at hxa hxb
state_before: G : Type u_2
H : Type ?u.2056
α : Type u_1
β : Type ?u.2062
E : Type ?u.2065
inst✝⁶ : Group G
inst✝⁵ : Group H
inst✝⁴ : MulAction G α
inst✝³ : MeasurableSpace α
inst✝² : MulAction H β
inst✝¹ : MeasurableSpace β
inst✝ : NormedAddCommGroup E
s t : Set α
μ : Measure α
h_meas : NullMeasurableSet s
h_exists : ∀ (x : α), ∃! g, g • x ∈ s
a b : G
hab : a ≠ b
x : α
hxa : x ∈ (fun g => g • s) a
hxb : x ∈ (fun g => g • s) b
⊢ False

tactic: exact hab (inv_injective <| (h_exists x).unique hxa hxb)
state_before: G : Type u_2
H : Type ?u.2056
α : Type u_1
β : Type ?u.2062
E : Type ?u.2065
inst✝⁶ : Group G
inst✝⁵ : Group H
inst✝⁴ : MulAction G α
inst✝³ : MeasurableSpace α
inst✝² : MulAction H β
inst✝¹ : MeasurableSpace β
inst✝ : NormedAddCommGroup E
s t : Set α
μ : Measure α
h_meas : NullMeasurableSet s
h_exists : ∀ (x : α), ∃! g, g • x ∈ s
a b : G
hab : a ≠ b
x : α
hxa : a⁻¹ • x ∈ s
hxb : b⁻¹ • x ∈ s
⊢ False
Theorem: UpperSet.codisjoint_coe
File: Mathlib/Order/UpperLower/Basic.lean

tactic: simp [disjoint_iff, codisjoint_iff, SetLike.ext'_iff]
state_before: α : Type u_1
β : Type ?u.61091
γ : Type ?u.61094
ι : Sort ?u.61097
κ : ι → Sort ?u.61102
inst✝ : LE α
S : Set (UpperSet α)
s t : UpperSet α
a : α
⊢ Codisjoint ↑s ↑t ↔ Disjoint s t
Theorem: Mathlib.Tactic.Ring.mul_one
File: Mathlib/Tactic/Ring/Basic.lean

tactic: simp [Nat.rawCast]
state_before: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a : R
⊢ a * Nat.rawCast 1 = a
Theorem: seqRight_eq_bind
File: src/lean/Init/Control/Lawful.lean

tactic: rw [seqRight_eq]
state_before: m : Type u_1 → Type u_2
α β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x : m α
y : m β
⊢ (SeqRight.seqRight x fun x => y) = do
    let _ ← x
    y

tactic: simp [map_eq_pure_bind, seq_eq_bind_map, const]
state_before: m : Type u_1 → Type u_2
α β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x : m α
y : m β
⊢ (Seq.seq (const α id <$> x) fun x => y) = do
    let _ ← x
    y
Theorem: Quaternion.continuous_im
File: Mathlib/Analysis/Quaternion.lean

tactic: simpa only [← sub_self_re] using continuous_id.sub (continuous_coe.comp continuous_re)
state_before: ⊢ Continuous fun q => im q
Theorem: Nat.ofDigits_modEq'
File: Mathlib/Data/Nat/Digits.lean

tactic: induction' L with d L ih
state_before: n b b' k : ℕ
h : b ≡ b' [MOD k]
L : List ℕ
⊢ ofDigits b L ≡ ofDigits b' L [MOD k]

tactic: rfl
state_before: case nil
n b b' k : ℕ
h : b ≡ b' [MOD k]
⊢ ofDigits b [] ≡ ofDigits b' [] [MOD k]

tactic: dsimp [ofDigits]
state_before: case cons
n b b' k : ℕ
h : b ≡ b' [MOD k]
d : ℕ
L : List ℕ
ih : ofDigits b L ≡ ofDigits b' L [MOD k]
⊢ ofDigits b (d :: L) ≡ ofDigits b' (d :: L) [MOD k]

tactic: dsimp [Nat.ModEq] at *
state_before: case cons
n b b' k : ℕ
h : b ≡ b' [MOD k]
d : ℕ
L : List ℕ
ih : ofDigits b L ≡ ofDigits b' L [MOD k]
⊢ d + b * ofDigits b L ≡ d + b' * ofDigits b' L [MOD k]

tactic: conv_lhs => rw [Nat.add_mod, Nat.mul_mod, h, ih]
state_before: case cons
n b b' k : ℕ
h : b % k = b' % k
d : ℕ
L : List ℕ
ih : ofDigits b L % k = ofDigits b' L % k
⊢ (d + b * ofDigits b L) % k = (d + b' * ofDigits b' L) % k

tactic: conv_rhs => rw [Nat.add_mod, Nat.mul_mod]
state_before: case cons
n b b' k : ℕ
h : b % k = b' % k
d : ℕ
L : List ℕ
ih : ofDigits b L % k = ofDigits b' L % k
⊢ (d % k + b' % k * (ofDigits b' L % k) % k) % k = (d + b' * ofDigits b' L) % k
Theorem: Finset.filter_not
File: Mathlib/Data/Finset/Basic.lean

tactic: simp only [Bool.decide_coe, Bool.not_eq_true', mem_filter, and_comm, mem_sdiff, not_and_or,
  Bool.not_eq_true, and_or_left, and_not_self, or_false]
state_before: α : Type u_1
β : Type ?u.397891
γ : Type ?u.397894
p q : α → Prop
inst✝² : DecidablePred p
inst✝¹ : DecidablePred q
inst✝ : DecidableEq α
s : Finset α
a : α
⊢ a ∈ filter (fun a => ¬p a) s ↔ a ∈ s \ filter p s
Theorem: Nat.sqrt_lt_self
File: Mathlib/Data/Nat/Sqrt.lean

tactic: have := Nat.mul_lt_mul_of_pos_left h (lt_of_succ_lt h)
state_before: n : ℕ
h : 1 < n
⊢ n < n * n

tactic: rwa [mul_one] at this
state_before: n : ℕ
h : 1 < n
this : n * 1 < n * n
⊢ n < n * n
Theorem: Set.bounded_inter_not
File: Mathlib/Order/Bounded.lean

tactic: refine' ⟨_, Bounded.mono (Set.inter_subset_left s _)⟩
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 : α
⊢ Bounded r (s ∩ {b | ¬r b a}) ↔ Bounded r s

tactic: rintro ⟨b, hb⟩
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 : α
⊢ Bounded r (s ∩ {b | ¬r b a}) → Bounded r s

tactic: cases' H a b with m hm
state_before: case intro
α : Type u_1
r : α → α → Prop
s t : Set α
H : ∀ (a b : α), ∃ m, ∀ (c : α), r c a ∨ r c b → r c m
a b : α
hb : ∀ (b_1 : α), b_1 ∈ s ∩ {b | ¬r b a} → r b_1 b
⊢ Bounded r s

tactic: exact ⟨m, fun c hc => hm c (or_iff_not_imp_left.2 fun hca => hb c ⟨hc, hca⟩)⟩
state_before: case intro.intro
α : Type u_1
r : α → α → Prop
s t : Set α
H : ∀ (a b : α), ∃ m, ∀ (c : α), r c a ∨ r c b → r c m
a b : α
hb : ∀ (b_1 : α), b_1 ∈ s ∩ {b | ¬r b a} → r b_1 b
m : α
hm : ∀ (c : α), r c a ∨ r c b → r c m
⊢ Bounded r s
Theorem: CauchySeq.mem_entourage
File: Mathlib/Topology/UniformSpace/Cauchy.lean

tactic: haveI := h.nonempty
state_before: α : Type u
β✝ : Type v
inst✝¹ : UniformSpace α
β : Type u_1
inst✝ : SemilatticeSup β
u : β → α
h : CauchySeq u
V : Set (α × α)
hV : V ∈ 𝓤 α
⊢ ∃ k₀, ∀ (i j : β), k₀ ≤ i → k₀ ≤ j → (u i, u j) ∈ V

tactic: have := h.tendsto_uniformity
state_before: α : Type u
β✝ : Type v
inst✝¹ : UniformSpace α
β : Type u_1
inst✝ : SemilatticeSup β
u : β → α
h : CauchySeq u
V : Set (α × α)
hV : V ∈ 𝓤 α
this : Nonempty β
⊢ ∃ k₀, ∀ (i j : β), k₀ ≤ i → k₀ ≤ j → (u i, u j) ∈ V

tactic: rw [← prod_atTop_atTop_eq] at this
state_before: α : Type u
β✝ : Type v
inst✝¹ : UniformSpace α
β : Type u_1
inst✝ : SemilatticeSup β
u : β → α
h : CauchySeq u
V : Set (α × α)
hV : V ∈ 𝓤 α
this✝ : Nonempty β
this : Tendsto (Prod.map u u) atTop (𝓤 α)
⊢ ∃ k₀, ∀ (i j : β), k₀ ≤ i → k₀ ≤ j → (u i, u j) ∈ V

tactic: simpa [MapsTo] using atTop_basis.prod_self.tendsto_left_iff.1 this V hV
state_before: α : Type u
β✝ : Type v
inst✝¹ : UniformSpace α
β : Type u_1
inst✝ : SemilatticeSup β
u : β → α
h : CauchySeq u
V : Set (α × α)
hV : V ∈ 𝓤 α
this✝ : Nonempty β
this : Tendsto (Prod.map u u) (atTop ×ˢ atTop) (𝓤 α)
⊢ ∃ k₀, ∀ (i j : β), k₀ ≤ i → k₀ ≤ j → (u i, u j) ∈ V
Theorem: ZMod.nat_cast_mod
File: Mathlib/Data/ZMod/Basic.lean

tactic: conv =>
    rhs
    rw [← Nat.mod_add_div a n]
state_before: a n : ℕ
⊢ ↑(a % n) = ↑a

tactic: simp
state_before: a n : ℕ
⊢ ↑(a % n) = ↑(a % n + n * (a / n))
Theorem: Lagrange.nodal_erase_eq_nodal_div
File: Mathlib/LinearAlgebra/Lagrange.lean

tactic: rw [nodal_eq_mul_nodal_erase hi, EuclideanDomain.mul_div_cancel_left]
state_before: F : Type u_2
inst✝¹ : Field F
ι : Type u_1
s : Finset ι
v : ι → F
i : ι
r : ι → F
x : F
inst✝ : DecidableEq ι
hi : i ∈ s
⊢ nodal (Finset.erase s i) v = nodal s v / (X - ↑C (v i))

tactic: exact X_sub_C_ne_zero _
state_before: case a0
F : Type u_2
inst✝¹ : Field F
ι : Type u_1
s : Finset ι
v : ι → F
i : ι
r : ι → F
x : F
inst✝ : DecidableEq ι
hi : i ∈ s
⊢ X - ↑C (v i) ≠ 0
Theorem: Ordinal.card_succ
File: Mathlib/SetTheory/Ordinal/Basic.lean

tactic: simp only [← add_one_eq_succ, card_add, card_one]
state_before: α : Type ?u.182364
β : Type ?u.182367
γ : Type ?u.182370
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
⊢ card (succ o) = card o + 1
Theorem: measurable_div_const'
File: Mathlib/MeasureTheory/Group/Arithmetic.lean

tactic: simp_rw [div_eq_mul_inv, measurable_mul_const]
state_before: G : Type u_1
inst✝² : DivInvMonoid G
inst✝¹ : MeasurableSpace G
inst✝ : MeasurableMul G
g : G
⊢ Measurable fun h => h / g
Theorem: Equiv.coe_subtypeEquivCodomain_symm
File: Mathlib/Logic/Equiv/Basic.lean

tactic: funext x'
state_before: X : Sort ?u.87976
inst✝ : DecidableEq X
x : X
Y : Sort ?u.88012
f : { x' // x' ≠ x } → Y
y : Y
⊢ (fun x' => if h : x' ≠ x then f { val := x', property := h } else y) ∘ Subtype.val = f

tactic: simp only [ne_eq, dite_not, comp_apply, Subtype.coe_eta, dite_eq_ite, ite_eq_right_iff]
state_before: case h
X : Sort ?u.87976
inst✝ : DecidableEq X
x : X
Y : Sort ?u.88012
f : { x' // x' ≠ x } → Y
y : Y
x' : { x' // x' ≠ x }
⊢ ((fun x' => if h : x' ≠ x then f { val := x', property := h } else y) ∘ Subtype.val) x' = f x'

tactic: intro w
state_before: case h
X : Sort ?u.87976
inst✝ : DecidableEq X
x : X
Y : Sort ?u.88012
f : { x' // x' ≠ x } → Y
y : Y
x' : { x' // x' ≠ x }
⊢ ↑x' = x → y = f x'

tactic: exfalso
state_before: case h
X : Sort ?u.87976
inst✝ : DecidableEq X
x : X
Y : Sort ?u.88012
f : { x' // x' ≠ x } → Y
y : Y
x' : { x' // x' ≠ x }
w : ↑x' = x
⊢ y = f x'

tactic: exact x'.property w
state_before: case h.h
X : Sort ?u.87976
inst✝ : DecidableEq X
x : X
Y : Sort ?u.88012
f : { x' // x' ≠ x } → Y
y : Y
x' : { x' // x' ≠ x }
w : ↑x' = x
⊢ False
Theorem: PowerBasis.degree_minpoly
File: Mathlib/RingTheory/PowerBasis.lean

tactic: rw [← minpolyGen_eq, degree_minpolyGen]
state_before: R : Type ?u.140709
S : Type u_2
T : Type ?u.140715
inst✝⁹ : CommRing R
inst✝⁸ : Ring S
inst✝⁷ : Algebra R S
A : Type u_1
B : Type ?u.141021
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Algebra A B
K : Type ?u.141443
inst✝² : Field K
inst✝¹ : Algebra A S
inst✝ : Nontrivial A
pb : PowerBasis A S
⊢ degree (minpoly A pb.gen) = ↑pb.dim
Theorem: Filter.frequently_principal
File: Mathlib/Order/Filter/Basic.lean

tactic: simp [Filter.Frequently, not_forall]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.171001
ι : Sort x
a : Set α
p : α → Prop
⊢ (∃ᶠ (x : α) in 𝓟 a, p x) ↔ ∃ x, x ∈ a ∧ p x
Theorem: Finite.card_option
File: Mathlib/Data/Finite/Card.lean

tactic: haveI := Fintype.ofFinite α
state_before: α : Type u_1
β : Type ?u.2024
γ : Type ?u.2027
inst✝ : Finite α
⊢ Nat.card (Option α) = Nat.card α + 1

tactic: simp only [Nat.card_eq_fintype_card, Fintype.card_option]
state_before: α : Type u_1
β : Type ?u.2024
γ : Type ?u.2027
inst✝ : Finite α
this : Fintype α
⊢ Nat.card (Option α) = Nat.card α + 1
Theorem: RatFunc.intDegree_neg
File: Mathlib/FieldTheory/RatFunc.lean

tactic: by_cases hx : x = 0
state_before: K : Type u
inst✝ : Field K
x : RatFunc K
⊢ intDegree (-x) = intDegree x

tactic: rw [hx, neg_zero]
state_before: case pos
K : Type u
inst✝ : Field K
x : RatFunc K
hx : x = 0
⊢ intDegree (-x) = intDegree x

tactic: rw [intDegree, intDegree, ← natDegree_neg x.num]
state_before: case neg
K : Type u
inst✝ : Field K
x : RatFunc K
hx : ¬x = 0
⊢ intDegree (-x) = intDegree x

tactic: exact
  natDegree_sub_eq_of_prod_eq (num_ne_zero (neg_ne_zero.mpr hx)) (denom_ne_zero (-x))
    (neg_ne_zero.mpr (num_ne_zero hx)) (denom_ne_zero x) (num_denom_neg x)
state_before: case neg
K : Type u
inst✝ : Field K
x : RatFunc K
hx : ¬x = 0
⊢ ↑(natDegree (num (-x))) - ↑(natDegree (denom (-x))) = ↑(natDegree (-num x)) - ↑(natDegree (denom x))
Theorem: CategoryTheory.isCoseparator_iff_mono
File: Mathlib/CategoryTheory/Generator.lean

tactic: rw [isCoseparator_def]
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
G : C
inst✝ : ∀ (A : C), HasProduct fun x => G
⊢ IsCoseparator G ↔ ∀ (A : C), Mono (Pi.lift fun f => f)

tactic: refine' ⟨fun h A => ⟨fun u v huv => h _ _ fun i => _⟩, fun h X Y f g hh => _⟩
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
G : C
inst✝ : ∀ (A : C), HasProduct fun x => G
⊢ (∀ ⦃X Y : C⦄ (f g : X ⟶ Y), (∀ (h : Y ⟶ G), f ≫ h = g ≫ h) → f = g) ↔ ∀ (A : C), Mono (Pi.lift fun f => f)

tactic: simpa using huv =≫ Pi.π _ i
state_before: case refine'_1
C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
G : C
inst✝ : ∀ (A : C), HasProduct fun x => G
h : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), (∀ (h : Y ⟶ G), f ≫ h = g ≫ h) → f = g
A Z✝ : C
u v : Z✝ ⟶ A
huv : (u ≫ Pi.lift fun f => f) = v ≫ Pi.lift fun f => f
i : A ⟶ G
⊢ u ≫ i = v ≫ i

tactic: haveI := h Y
state_before: case refine'_2
C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
G : C
inst✝ : ∀ (A : C), HasProduct fun x => G
h : ∀ (A : C), Mono (Pi.lift fun f => f)
X Y : C
f g : X ⟶ Y
hh : ∀ (h : Y ⟶ G), f ≫ h = g ≫ h
⊢ f = g

tactic: refine' (cancel_mono (Pi.lift fun f : Y ⟶ G => f)).1 (limit.hom_ext fun j => _)
state_before: case refine'_2
C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
G : C
inst✝ : ∀ (A : C), HasProduct fun x => G
h : ∀ (A : C), Mono (Pi.lift fun f => f)
X Y : C
f g : X ⟶ Y
hh : ∀ (h : Y ⟶ G), f ≫ h = g ≫ h
this : Mono (Pi.lift fun f => f)
⊢ f = g

tactic: simpa using hh j.as
state_before: case refine'_2
C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
G : C
inst✝ : ∀ (A : C), HasProduct fun x => G
h : ∀ (A : C), Mono (Pi.lift fun f => f)
X Y : C
f g : X ⟶ Y
hh : ∀ (h : Y ⟶ G), f ≫ h = g ≫ h
this : Mono (Pi.lift fun f => f)
j : Discrete (Y ⟶ G)
⊢ (f ≫ Pi.lift fun f => f) ≫ limit.π (Discrete.functor fun f => G) j =
    (g ≫ Pi.lift fun f => f) ≫ limit.π (Discrete.functor fun f => G) j
Theorem: String.Iterator.Valid.validFor
File: Std/Data/String/Lemmas.lean

tactic: simpa [List.reverseAux_eq] using @ValidFor.mk l.reverse r
state_before: l r : List Char
⊢ ValidFor (List.reverse l) r { s := { data := l ++ r }, i := { byteIdx := utf8ByteSize.go l } }
Theorem: Ordinal.enumOrd_le_of_subset
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: apply Ordinal.induction a
state_before: S✝ : Set Ordinal
S T : Set Ordinal
hS : Unbounded (fun x x_1 => x < x_1) S
hST : S ⊆ T
a : Ordinal
⊢ enumOrd T a ≤ enumOrd S a

tactic: intro b H
state_before: S✝ : Set Ordinal
S T : Set Ordinal
hS : Unbounded (fun x x_1 => x < x_1) S
hST : S ⊆ T
a : Ordinal
⊢ ∀ (j : Ordinal), (∀ (k : Ordinal), k < j → enumOrd T k ≤ enumOrd S k) → enumOrd T j ≤ enumOrd S j

tactic: rw [enumOrd_def]
state_before: S✝ : Set Ordinal
S T : Set Ordinal
hS : Unbounded (fun x x_1 => x < x_1) S
hST : S ⊆ T
a b : Ordinal
H : ∀ (k : Ordinal), k < b → enumOrd T k ≤ enumOrd S k
⊢ enumOrd T b ≤ enumOrd S b

tactic: exact csInf_le' ⟨hST (enumOrd_mem hS b), fun c h => (H c h).trans_lt (enumOrd_strictMono hS h)⟩
state_before: S✝ : Set Ordinal
S T : Set Ordinal
hS : Unbounded (fun x x_1 => x < x_1) S
hST : S ⊆ T
a b : Ordinal
H : ∀ (k : Ordinal), k < b → enumOrd T k ≤ enumOrd S k
⊢ sInf (T ∩ {b_1 | ∀ (c : Ordinal), c < b → enumOrd T c < b_1}) ≤ enumOrd S b
Theorem: LinearMap.mul_injective
File: Mathlib/Algebra/Algebra/Bilinear.lean

tactic: letI : Nontrivial A := ⟨⟨x, 0, hx⟩⟩
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : Ring A
inst✝¹ : Algebra R A
inst✝ : NoZeroDivisors A
x : A
hx : x ≠ 0
⊢ Function.Injective ↑(↑(mul R A) x)

tactic: letI := NoZeroDivisors.to_isDomain A
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : Ring A
inst✝¹ : Algebra R A
inst✝ : NoZeroDivisors A
x : A
hx : x ≠ 0
this : Nontrivial A := { exists_pair_ne := Exists.intro x (Exists.intro 0 hx) }
⊢ Function.Injective ↑(↑(mul R A) x)

tactic: exact mul_right_injective₀ hx
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : Ring A
inst✝¹ : Algebra R A
inst✝ : NoZeroDivisors A
x : A
hx : x ≠ 0
this✝ : Nontrivial A := { exists_pair_ne := Exists.intro x (Exists.intro 0 hx) }
this : IsDomain A := NoZeroDivisors.to_isDomain A
⊢ Function.Injective ↑(↑(mul R A) x)
Theorem: lt_inv_smul_iff
File: Mathlib/Algebra/Order/SMul.lean

tactic: rw [← smul_lt_smul_iff_of_pos h, smul_inv_smul₀ h.ne']
state_before: ι : Type ?u.118036
𝕜 : Type u_1
R : Type ?u.118042
M : Type u_2
N : Type ?u.118048
inst✝⁵ : LinearOrderedSemifield 𝕜
inst✝⁴ : OrderedAddCommMonoid M
inst✝³ : OrderedAddCommMonoid N
inst✝² : MulActionWithZero 𝕜 M
inst✝¹ : MulActionWithZero 𝕜 N
inst✝ : OrderedSMul 𝕜 M
s : Set M
a b : M
c : 𝕜
h : 0 < c
⊢ a < c⁻¹ • b ↔ c • a < b
Theorem: Matrix.conjTranspose_inv_intCast_smul
File: Mathlib/Data/Matrix/Basic.lean

tactic: simp
state_before: l : Type ?u.1018297
m : Type u_2
n : Type u_3
o : Type ?u.1018306
m' : o → Type ?u.1018311
n' : o → Type ?u.1018316
R : Type u_1
S : Type ?u.1018322
α : Type v
β : Type w
γ : Type ?u.1018329
inst✝³ : DivisionRing R
inst✝² : AddCommGroup α
inst✝¹ : StarAddMonoid α
inst✝ : Module R α
c : ℤ
M : Matrix m n α
⊢ ∀ (i : n) (j : m), ((↑c)⁻¹ • M)ᴴ i j = ((↑c)⁻¹ • Mᴴ) i j
Theorem: CategoryTheory.PreservesImage.hom_comp_map_image_ι
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Images.lean

tactic: rw [iso_hom, image.lift_fac]
state_before: A : Type u₁
B : Type u₂
inst✝⁷ : Category A
inst✝⁶ : Category B
inst✝⁵ : HasEqualizers A
inst✝⁴ : HasImages A
inst✝³ : StrongEpiCategory B
inst✝² : HasImages B
L : A ⥤ B
inst✝¹ : {X Y Z : A} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PreservesLimit (cospan f g) L
inst✝ : {X Y Z : A} → (f : X ⟶ Y) → (g : X ⟶ Z) → PreservesColimit (span f g) L
X Y : A
f : X ⟶ Y
⊢ (iso L f).hom ≫ L.map (image.ι f) = image.ι (L.map f)
Theorem: CategoryTheory.Sieve.sSup_apply
File: Mathlib/CategoryTheory/Sites/Sieves.lean

tactic: simp [sSup, Sieve.sup, setOf]
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y✝ Z : C
f✝ : Y✝ ⟶ X
S R : Sieve X
Ss : Set (Sieve X)
Y : C
f : Y ⟶ X
⊢ (sSup Ss).arrows f ↔ ∃ S x, S.arrows f
Theorem: Nat.ArithmeticFunction.sum_eq_iff_sum_mul_moebius_eq
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: rw [sum_eq_iff_sum_smul_moebius_eq]
state_before: R : Type u_1
inst✝ : Ring R
f g : ℕ → R
⊢ (∀ (n : ℕ), 0 < n → ∑ i in divisors n, f i = g n) ↔
    ∀ (n : ℕ), 0 < n → ∑ x in divisorsAntidiagonal n, ↑(↑μ x.fst) * g x.snd = f n

tactic: apply forall_congr'
state_before: R : Type u_1
inst✝ : Ring R
f g : ℕ → R
⊢ (∀ (n : ℕ), 0 < n → ∑ x in divisorsAntidiagonal n, ↑μ x.fst • g x.snd = f n) ↔
    ∀ (n : ℕ), 0 < n → ∑ x in divisorsAntidiagonal n, ↑(↑μ x.fst) * g x.snd = f n

tactic: refine' fun a => imp_congr_right fun _ => (sum_congr rfl fun x _hx => _).congr_left
state_before: case h
R : Type u_1
inst✝ : Ring R
f g : ℕ → R
⊢ ∀ (a : ℕ),
    0 < a → ∑ x in divisorsAntidiagonal a, ↑μ x.fst • g x.snd = f a ↔
      0 < a → ∑ x in divisorsAntidiagonal a, ↑(↑μ x.fst) * g x.snd = f a

tactic: rw [zsmul_eq_mul]
state_before: case h
R : Type u_1
inst✝ : Ring R
f g : ℕ → R
a : ℕ
x✝ : 0 < a
x : ℕ × ℕ
_hx : x ∈ divisorsAntidiagonal a
⊢ ↑μ x.fst • g x.snd = ↑(↑μ x.fst) * g x.snd
Theorem: Real.sqrt_div'
File: Mathlib/Data/Real/Sqrt.lean

tactic: rw [division_def, sqrt_mul' x (inv_nonneg.2 hy), sqrt_inv, division_def]
state_before: x y : ℝ
hy : 0 ≤ y
⊢ sqrt (x / y) = sqrt x / sqrt y
Theorem: MvPolynomial.esymm_eq_multiset_esymm
File: Mathlib/RingTheory/MvPolynomial/Symmetric.lean

tactic: refine' funext fun n => (Finset.esymm_map_val X _ n).symm
state_before: σ : Type u_1
R : Type u_2
τ : Type ?u.69783
S : Type ?u.69786
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : Fintype σ
inst✝ : Fintype τ
⊢ esymm σ R = Multiset.esymm (Multiset.map X univ.val)
Theorem: TopologicalSpace.IsTopologicalBasis.isOpen
File: Mathlib/Topology/Bases.lean

tactic: rw [hb.eq_generateFrom]
state_before: α : Type u
t : TopologicalSpace α
s : Set α
b : Set (Set α)
hb : IsTopologicalBasis b
hs : s ∈ b
⊢ IsOpen s

tactic: exact .basic s hs
state_before: α : Type u
t : TopologicalSpace α
s : Set α
b : Set (Set α)
hb : IsTopologicalBasis b
hs : s ∈ b
⊢ IsOpen s