tasksource/leandojo huggingface dataset:
Theorem: Option.injective_iff
File: Mathlib/Data/Set/Image.lean

tactic: refine'
  ⟨fun hf => ⟨hf.comp (Option.some_injective _), fun x => hf.ne <| Option.some_ne_none _⟩, _⟩
state_before: α : Type u_1
β : Type u_2
f : Option α → β
⊢ Injective f ↔ (Injective fun x => f (some x)) ∧ ∀ (x : α), ¬f (some x) = f none

tactic: rintro ⟨h_some, h_none⟩ (_ | a) (_ | b) hab
state_before: α : Type u_1
β : Type u_2
f : Option α → β
⊢ ((Injective fun x => f (some x)) ∧ ∀ (x : α), ¬f (some x) = f none) → Injective f

tactic: exacts [rfl, (h_none _ hab.symm).elim, (h_none _ hab).elim, congr_arg some (h_some hab)]
state_before: case intro.none.none
α : Type u_1
β : Type u_2
f : Option α → β
h_some : Injective fun x => f (some x)
h_none : ∀ (x : α), ¬f (some x) = f none
hab : f none = f none
⊢ none = none

case intro.none.some
α : Type u_1
β : Type u_2
f : Option α → β
h_some : Injective fun x => f (some x)
h_none : ∀ (x : α), ¬f (some x) = f none
b : α
hab : f none = f (some b)
⊢ none = some b

case intro.some.none
α : Type u_1
β : Type u_2
f : Option α → β
h_some : Injective fun x => f (some x)
h_none : ∀ (x : α), ¬f (some x) = f none
a : α
hab : f (some a) = f none
⊢ some a = none

case intro.some.some
α : Type u_1
β : Type u_2
f : Option α → β
h_some : Injective fun x => f (some x)
h_none : ∀ (x : α), ¬f (some x) = f none
a b : α
hab : f (some a) = f (some b)
⊢ some a = some b
Theorem: AffineMap.lineMap_symm
File: Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean

tactic: rw [comp_lineMap]
state_before: k : Type u_1
V1 : Type u_2
P1 : Type u_3
V2 : Type ?u.527038
P2 : Type ?u.527041
V3 : Type ?u.527044
P3 : Type ?u.527047
V4 : Type ?u.527050
P4 : Type ?u.527053
inst✝¹² : Ring k
inst✝¹¹ : AddCommGroup V1
inst✝¹⁰ : Module k V1
inst✝⁹ : AffineSpace V1 P1
inst✝⁸ : AddCommGroup V2
inst✝⁷ : Module k V2
inst✝⁶ : AffineSpace V2 P2
inst✝⁵ : AddCommGroup V3
inst✝⁴ : Module k V3
inst✝³ : AffineSpace V3 P3
inst✝² : AddCommGroup V4
inst✝¹ : Module k V4
inst✝ : AffineSpace V4 P4
p₀ p₁ : P1
⊢ lineMap p₀ p₁ = comp (lineMap p₁ p₀) (lineMap 1 0)

tactic: simp
state_before: k : Type u_1
V1 : Type u_2
P1 : Type u_3
V2 : Type ?u.527038
P2 : Type ?u.527041
V3 : Type ?u.527044
P3 : Type ?u.527047
V4 : Type ?u.527050
P4 : Type ?u.527053
inst✝¹² : Ring k
inst✝¹¹ : AddCommGroup V1
inst✝¹⁰ : Module k V1
inst✝⁹ : AffineSpace V1 P1
inst✝⁸ : AddCommGroup V2
inst✝⁷ : Module k V2
inst✝⁶ : AffineSpace V2 P2
inst✝⁵ : AddCommGroup V3
inst✝⁴ : Module k V3
inst✝³ : AffineSpace V3 P3
inst✝² : AddCommGroup V4
inst✝¹ : Module k V4
inst✝ : AffineSpace V4 P4
p₀ p₁ : P1
⊢ lineMap p₀ p₁ = lineMap (↑(lineMap p₁ p₀) 1) (↑(lineMap p₁ p₀) 0)
Theorem: Sym2.GameAdd.fix_eq
File: Mathlib/Order/GameAdd.lean

tactic: dsimp [GameAdd.fix]
state_before: α : Type u_2
β : Type ?u.8826
rα : α → α → Prop
rβ : β → β → Prop
C : α → α → Sort u_1
hr : WellFounded rα
IH :
  (a₁ b₁ : α) →
    ((a₂ b₂ : α) → GameAdd rα (Quotient.mk (Rel.setoid α) (a₂, b₂)) (Quotient.mk (Rel.setoid α) (a₁, b₁)) → C a₂ b₂) →
      C a₁ b₁
a b : α
⊢ fix hr IH a b = IH a b fun a' b' x => fix hr IH a' b'

tactic: exact WellFounded.fix_eq _ _ _
state_before: α : Type u_2
β : Type ?u.8826
rα : α → α → Prop
rβ : β → β → Prop
C : α → α → Sort u_1
hr : WellFounded rα
IH :
  (a₁ b₁ : α) →
    ((a₂ b₂ : α) → GameAdd rα (Quotient.mk (Rel.setoid α) (a₂, b₂)) (Quotient.mk (Rel.setoid α) (a₁, b₁)) → C a₂ b₂) →
      C a₁ b₁
a b : α
⊢ WellFounded.fix
      (_ :
        WellFounded fun a b =>
          Prod.GameAdd rα rα (a.fst, a.snd) (b.fst, b.snd) ∨ Prod.GameAdd rα rα (a.snd, a.fst) (b.fst, b.snd))
      (fun x IH' => IH x.fst x.snd fun a' b' => IH' (a', b')) (a, b) =
    IH a b fun a' b' x =>
      WellFounded.fix
        (_ :
          WellFounded fun a b =>
            Prod.GameAdd rα rα (a.fst, a.snd) (b.fst, b.snd) ∨ Prod.GameAdd rα rα (a.snd, a.fst) (b.fst, b.snd))
        (fun x IH' => IH x.fst x.snd fun a' b' => IH' (a', b')) (a', b')
Theorem: mul_neg_one_pow_eq_zero_iff
File: Mathlib/Algebra/GroupPower/Ring.lean

tactic: rcases neg_one_pow_eq_or R n with h | h  <;> simp [h]
state_before: R : Type u_1
S : Type ?u.121845
M : Type ?u.121848
inst✝ : Ring R
a b : R
n : ℕ
r : R
⊢ r * (-1) ^ n = 0 ↔ r = 0
Theorem: map_nonpos
File: Mathlib/Algebra/Order/Hom/Monoid.lean

tactic: rw [← map_zero f]
state_before: F : Type u_3
α : Type u_1
β : Type u_2
γ : Type ?u.33978
δ : Type ?u.33981
inst✝² : OrderedAddCommMonoid α
inst✝¹ : OrderedAddCommMonoid β
inst✝ : OrderAddMonoidHomClass F α β
f : F
a : α
ha : a ≤ 0
⊢ ↑f a ≤ 0

tactic: exact OrderHomClass.mono _ ha
state_before: F : Type u_3
α : Type u_1
β : Type u_2
γ : Type ?u.33978
δ : Type ?u.33981
inst✝² : OrderedAddCommMonoid α
inst✝¹ : OrderedAddCommMonoid β
inst✝ : OrderAddMonoidHomClass F α β
f : F
a : α
ha : a ≤ 0
⊢ ↑f a ≤ ↑f 0
Theorem: LiouvilleWith.ne_cast_int
File: Mathlib/NumberTheory/Liouville/LiouvilleWith.lean

tactic: rintro rfl
state_before: p q x y : ℝ
r : ℚ
m✝ : ℤ
n : ℕ
h : LiouvilleWith p x
hp : 1 < p
m : ℤ
⊢ x ≠ ↑m

tactic: rename' m => M
state_before: p q y : ℝ
r : ℚ
m✝ : ℤ
n : ℕ
hp : 1 < p
m : ℤ
h : LiouvilleWith p ↑m
⊢ False

tactic: rcases((eventually_gt_atTop 0).and_frequently (h.frequently_lt_rpow_neg hp)).exists with
  ⟨n : ℕ, hn : 0 < n, m : ℤ, hne : (M : ℝ) ≠ m / n, hlt : |(M - m / n : ℝ)| < n ^ (-1 : ℝ)⟩
state_before: p q y : ℝ
r : ℚ
m : ℤ
n : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
⊢ False

tactic: refine hlt.not_le ?_
state_before: case intro.intro.intro.intro
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ↑M ≠ ↑m / ↑n
hlt : abs (↑M - ↑m / ↑n) < ↑n ^ (-1)
⊢ False

tactic: have hn' : (0 : ℝ) < n := by simpa
state_before: case intro.intro.intro.intro
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ↑M ≠ ↑m / ↑n
hlt : abs (↑M - ↑m / ↑n) < ↑n ^ (-1)
⊢ ↑n ^ (-1) ≤ abs (↑M - ↑m / ↑n)

tactic: rw [rpow_neg_one, ← one_div, sub_div' _ _ _ hn'.ne', abs_div, Nat.abs_cast, div_le_div_right hn']
state_before: case intro.intro.intro.intro
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ↑M ≠ ↑m / ↑n
hlt : abs (↑M - ↑m / ↑n) < ↑n ^ (-1)
hn' : 0 < ↑n
⊢ ↑n ^ (-1) ≤ abs (↑M - ↑m / ↑n)

tactic: norm_cast
state_before: case intro.intro.intro.intro
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ↑M ≠ ↑m / ↑n
hlt : abs (↑M - ↑m / ↑n) < ↑n ^ (-1)
hn' : 0 < ↑n
⊢ 1 ≤ abs (↑M * ↑n - ↑m)

tactic: rw [← zero_add (1 : ℤ), Int.add_one_le_iff, abs_pos, sub_ne_zero]
state_before: case intro.intro.intro.intro
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ↑M ≠ ↑m / ↑n
hlt : abs (↑M - ↑m / ↑n) < ↑n ^ (-1)
hn' : 0 < ↑n
⊢ 1 ≤ abs (M * ↑n - m)

tactic: rw [Ne.def, eq_div_iff hn'.ne'] at hne
state_before: case intro.intro.intro.intro
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ↑M ≠ ↑m / ↑n
hlt : abs (↑M - ↑m / ↑n) < ↑n ^ (-1)
hn' : 0 < ↑n
⊢ M * ↑n ≠ m

tactic: exact_mod_cast hne
state_before: case intro.intro.intro.intro
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ¬↑M * ↑n = ↑m
hlt : abs (↑M - ↑m / ↑n) < ↑n ^ (-1)
hn' : 0 < ↑n
⊢ M * ↑n ≠ m

tactic: simpa
state_before: p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ↑M ≠ ↑m / ↑n
hlt : abs (↑M - ↑m / ↑n) < ↑n ^ (-1)
⊢ 0 < ↑n
Theorem: Function.Antiperiodic.int_mul_eq_of_eq_zero
File: Mathlib/Algebra/Periodic.lean

tactic: rw [Int.cast_ofNat, h.nat_mul_eq_of_eq_zero hi n]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.162678
f g : α → β
c c₁ c₂ x : α
inst✝¹ : Ring α
inst✝ : SubtractionMonoid β
h : Antiperiodic f c
hi : f 0 = 0
n : ℕ
⊢ f (↑↑n * c) = 0

tactic: rw [Int.cast_negSucc, neg_mul, ← mul_neg, h.neg.nat_mul_eq_of_eq_zero hi]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.162678
f g : α → β
c c₁ c₂ x : α
inst✝¹ : Ring α
inst✝ : SubtractionMonoid β
h : Antiperiodic f c
hi : f 0 = 0
n : ℕ
⊢ f (↑(Int.negSucc n) * c) = 0
Theorem: Ordinal.cof_lsub_le
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rw [cof_eq_sInf_lsub]
state_before: α : Type ?u.21876
r : α → α → Prop
ι : Type u
f : ι → Ordinal
⊢ cof (lsub f) ≤ (#ι)

tactic: exact csInf_le' ⟨ι, f, rfl, rfl⟩
state_before: α : Type ?u.21876
r : α → α → Prop
ι : Type u
f : ι → Ordinal
⊢ sInf {a | ∃ ι_1 f_1, lsub f_1 = lsub f ∧ (#ι_1) = a} ≤ (#ι)
Theorem: Ordinal.sup_lt_ord
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rwa [(#ι).lift_id]
state_before: α : Type ?u.30591
r : α → α → Prop
ι : Type u
f : ι → Ordinal
c : Ordinal
hι : (#ι) < cof c
⊢ Cardinal.lift (#ι) < cof c
Theorem: CategoryTheory.IsPullback.of_hasBinaryProduct
File: Mathlib/CategoryTheory/Limits/Shapes/CommSq.lean

tactic: convert @of_is_product _ _ X Y 0 _ (limit.isLimit _) HasZeroObject.zeroIsTerminal
state_before: C : Type u₁
inst✝³ : Category C
P X Y Z : C
fst : P ⟶ X
snd : P ⟶ Y
f : X ⟶ Z
g : Y ⟶ Z
inst✝² : HasBinaryProduct X Y
inst✝¹ : HasZeroObject C
inst✝ : HasZeroMorphisms C
⊢ IsPullback prod.fst prod.snd 0 0
Theorem: irrational_iff_ne_rational
File: Mathlib/Data/Real/Irrational.lean

tactic: simp only [Irrational, Rat.forall, cast_mk, not_exists, Set.mem_range, cast_coe_int, cast_div,
  eq_comm]
state_before: x : ℝ
⊢ Irrational x ↔ ∀ (a b : ℤ), x ≠ ↑a / ↑b
Theorem: CategoryTheory.Subobject.factorThru_eq_zero
File: Mathlib/CategoryTheory/Subobject/FactorThru.lean

tactic: fconstructor
state_before: C : Type u₁
inst✝² : Category C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasZeroMorphisms C
X Y : C
P : Subobject Y
f : X ⟶ Y
h : Factors P f
⊢ factorThru P f h = 0 ↔ f = 0

tactic: intro w
state_before: case mp
C : Type u₁
inst✝² : Category C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasZeroMorphisms C
X Y : C
P : Subobject Y
f : X ⟶ Y
h : Factors P f
⊢ factorThru P f h = 0 → f = 0

tactic: replace w := w =≫ P.arrow
state_before: case mp
C : Type u₁
inst✝² : Category C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasZeroMorphisms C
X Y : C
P : Subobject Y
f : X ⟶ Y
h : Factors P f
w : factorThru P f h = 0
⊢ f = 0

tactic: simpa using w
state_before: case mp
C : Type u₁
inst✝² : Category C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasZeroMorphisms C
X Y : C
P : Subobject Y
f : X ⟶ Y
h : Factors P f
w : factorThru P f h ≫ arrow P = 0 ≫ arrow P
⊢ f = 0

tactic: rintro rfl
state_before: case mpr
C : Type u₁
inst✝² : Category C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasZeroMorphisms C
X Y : C
P : Subobject Y
f : X ⟶ Y
h : Factors P f
⊢ f = 0 → factorThru P f h = 0

tactic: ext
state_before: case mpr
C : Type u₁
inst✝² : Category C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasZeroMorphisms C
X Y : C
P : Subobject Y
h : Factors P 0
⊢ factorThru P 0 h = 0

tactic: simp
state_before: case mpr.h
C : Type u₁
inst✝² : Category C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasZeroMorphisms C
X Y : C
P : Subobject Y
h : Factors P 0
⊢ factorThru P 0 h ≫ arrow P = 0 ≫ arrow P
Theorem: Complex.rat_cast_im
File: Mathlib/Data/Complex/Basic.lean

tactic: rw [← ofReal_rat_cast, ofReal_im]
state_before: q : ℚ
⊢ (↑q).im = 0
Theorem: Polynomial.monic_generator_eq_minpoly
File: Mathlib/LinearAlgebra/AnnihilatingPolynomial.lean

tactic: by_cases h : p = 0
state_before: 𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
p : 𝕜[X]
p_monic : Monic p
p_gen : Ideal.span {p} = annIdeal 𝕜 a
⊢ annIdealGenerator 𝕜 a = p

tactic: rwa [h, annIdealGenerator_eq_zero_iff, ← p_gen, Ideal.span_singleton_eq_bot.mpr]
state_before: case pos
𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
p : 𝕜[X]
p_monic : Monic p
p_gen : Ideal.span {p} = annIdeal 𝕜 a
h : p = 0
⊢ annIdealGenerator 𝕜 a = p

tactic: rw [← span_singleton_annIdealGenerator, Ideal.span_singleton_eq_span_singleton] at p_gen
state_before: case neg
𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
p : 𝕜[X]
p_monic : Monic p
p_gen : Ideal.span {p} = annIdeal 𝕜 a
h : ¬p = 0
⊢ annIdealGenerator 𝕜 a = p

tactic: rw [eq_comm]
state_before: case neg
𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
p : 𝕜[X]
p_monic : Monic p
p_gen : Associated p (annIdealGenerator 𝕜 a)
h : ¬p = 0
⊢ annIdealGenerator 𝕜 a = p

tactic: apply eq_of_monic_of_associated p_monic _ p_gen
state_before: case neg
𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
p : 𝕜[X]
p_monic : Monic p
p_gen : Associated p (annIdealGenerator 𝕜 a)
h : ¬p = 0
⊢ p = annIdealGenerator 𝕜 a

tactic: apply monic_annIdealGenerator _ _ ((Associated.ne_zero_iff p_gen).mp h)
state_before: 𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
p : 𝕜[X]
p_monic : Monic p
p_gen : Associated p (annIdealGenerator 𝕜 a)
h : ¬p = 0
⊢ Monic (annIdealGenerator 𝕜 a)
Theorem: Equiv.Perm.ofFn_comp_perm
File: Mathlib/Data/List/FinRange.lean

tactic: rw [ofFn_eq_map, ofFn_eq_map, ← map_map]
state_before: n : ℕ
α : Type u
σ : Perm (Fin n)
f : Fin n → α
⊢ ofFn (f ∘ ↑σ) ~ ofFn f

tactic: exact σ.map_finRange_perm.map f
state_before: n : ℕ
α : Type u
σ : Perm (Fin n)
f : Fin n → α
⊢ map f (map (↑σ) (finRange n)) ~ map f (finRange n)
Theorem: BoundedContinuousFunction.norm_compContinuous_le
File: Mathlib/Topology/ContinuousFunction/Bounded.lean

tactic: rw [NNReal.coe_one, one_mul, dist_zero_right]
state_before: F : Type ?u.1066082
α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : SeminormedAddCommGroup β
f✝ g✝ : α →ᵇ β
x : α
C : ℝ
inst✝ : TopologicalSpace γ
f : α →ᵇ β
g : C(γ, α)
⊢ ↑1 * dist f 0 ≤ ‖f‖
Theorem: ENNReal.lt_top_of_mul_ne_top_right
File: Mathlib/Data/Real/ENNReal.lean

tactic: rwa [mul_comm]
state_before: α : Type ?u.92309
β : Type ?u.92312
a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a * b ≠ ⊤
ha : a ≠ 0
⊢ b * a ≠ ⊤
Theorem: Ordinal.nadd_def
File: Mathlib/SetTheory/Ordinal/NaturalOps.lean

tactic: rw [nadd]
state_before: a✝ b✝ c a b : Ordinal
⊢ a ♯ b = max (blsub a fun a' x => a' ♯ b) (blsub b fun b' x => a ♯ b')
Theorem: LieModuleEquiv.symm_symm
File: Mathlib/Algebra/Lie/Basic.lean

tactic: rfl
state_before: R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
e : M ≃ₗ⁅R,L⁆ N
⊢ symm (symm e) = e
Theorem: Monotone.div_const
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: haveI := @LinearOrder.decidableLE α _
state_before: ι : Type ?u.113111
α : Type u_2
β✝ : Type ?u.113117
inst✝¹ : LinearOrderedSemifield α
a b c✝ d e : α
m n : ℤ
β : Type u_1
inst✝ : Preorder β
f : β → α
hf : Monotone f
c : α
hc : 0 ≤ c
⊢ Monotone fun x => f x / c

tactic: simpa only [div_eq_mul_inv] using (monotone_mul_right_of_nonneg (inv_nonneg.2 hc)).comp hf
state_before: ι : Type ?u.113111
α : Type u_2
β✝ : Type ?u.113117
inst✝¹ : LinearOrderedSemifield α
a b c✝ d e : α
m n : ℤ
β : Type u_1
inst✝ : Preorder β
f : β → α
hf : Monotone f
c : α
hc : 0 ≤ c
this : DecidableRel fun x x_1 => x ≤ x_1
⊢ Monotone fun x => f x / c
Theorem: PNat.XgcdType.reduce_isReduced
File: Mathlib/Data/PNat/Xgcd.lean

tactic: rw [reduce_a h]
state_before: u✝ x✝ : XgcdType
u : XgcdType := x✝
h : r u = 0
⊢ IsReduced (reduce x✝)

tactic: exact u.finish_isReduced
state_before: u✝ x✝ : XgcdType
u : XgcdType := x✝
h : r u = 0
⊢ IsReduced (finish u)

tactic: have : SizeOf.sizeOf u.step < SizeOf.sizeOf u := u.step_wf h
state_before: u✝ x✝ : XgcdType
u : XgcdType := x✝
h : ¬r u = 0
⊢ IsReduced (reduce x✝)

tactic: rw [reduce_b h, flip_isReduced]
state_before: u✝ x✝ : XgcdType
u : XgcdType := x✝
h : ¬r u = 0
this : sizeOf (step u) < sizeOf u
⊢ IsReduced (reduce x✝)

tactic: apply reduce_isReduced
state_before: u✝ x✝ : XgcdType
u : XgcdType := x✝
h : ¬r u = 0
this : sizeOf (step u) < sizeOf u
⊢ IsReduced (reduce (step u))
Theorem: IsUnit.div_self
File: Mathlib/Algebra/Hom/Units.lean

tactic: rw [div_eq_mul_inv, h.mul_inv_cancel]
state_before: F : Type ?u.48815
G : Type ?u.48818
α : Type u_1
M : Type ?u.48824
N : Type ?u.48827
inst✝ : DivisionMonoid α
a b c : α
h : IsUnit a
⊢ a / a = 1
Theorem: Real.Lp_add_le_of_nonneg
File: Mathlib/Analysis/MeanInequalities.lean

tactic: convert Lp_add_le s f g hp using 2 <;> [skip;congr 1;congr 1] <;> apply sum_congr rfl <;>
    intro i hi <;>
  simp only [abs_of_nonneg, hf i hi, hg i hi, add_nonneg]
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ
p q : ℝ
hp : 1 ≤ p
hf : ∀ (i : ι), i ∈ s → 0 ≤ f i
hg : ∀ (i : ι), i ∈ s → 0 ≤ g i
⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)
Theorem: Matrix.mul_one
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext
state_before: l : Type ?u.318419
m : Type u_2
n : Type u_1
o : Type ?u.318428
m' : o → Type ?u.318433
n' : o → Type ?u.318438
R : Type ?u.318441
S : Type ?u.318444
α : Type v
β : Type w
γ : Type ?u.318451
inst✝² : NonAssocSemiring α
inst✝¹ : Fintype n
inst✝ : DecidableEq n
M : Matrix m n α
⊢ M ⬝ 1 = M

tactic: rw [← diagonal_one, mul_diagonal, mul_one]
state_before: case a.h
l : Type ?u.318419
m : Type u_2
n : Type u_1
o : Type ?u.318428
m' : o → Type ?u.318433
n' : o → Type ?u.318438
R : Type ?u.318441
S : Type ?u.318444
α : Type v
β : Type w
γ : Type ?u.318451
inst✝² : NonAssocSemiring α
inst✝¹ : Fintype n
inst✝ : DecidableEq n
M : Matrix m n α
i✝ : m
x✝ : n
⊢ (M ⬝ 1) i✝ x✝ = M i✝ x✝
Theorem: Subalgebra.rank_bot
File: Mathlib/LinearAlgebra/Finrank.lean

tactic: letI := Module.nontrivial F E
state_before: K : Type u
V : Type v
F : Type u_2
E : Type u_1
inst✝⁵ : CommRing F
inst✝⁴ : Ring E
inst✝³ : Algebra F E
inst✝² : StrongRankCondition F
inst✝¹ : NoZeroSMulDivisors F E
inst✝ : Nontrivial E
⊢ Module.rank F { x // x ∈ span F {1} } = 1

tactic: rw [rank_span_set]
state_before: K : Type u
V : Type v
F : Type u_2
E : Type u_1
inst✝⁵ : CommRing F
inst✝⁴ : Ring E
inst✝³ : Algebra F E
inst✝² : StrongRankCondition F
inst✝¹ : NoZeroSMulDivisors F E
inst✝ : Nontrivial E
this : Nontrivial F := Module.nontrivial F E
⊢ Module.rank F { x // x ∈ span F {1} } = 1

tactic: exacts [mk_singleton _, linearIndependent_singleton one_ne_zero]
state_before: K : Type u
V : Type v
F : Type u_2
E : Type u_1
inst✝⁵ : CommRing F
inst✝⁴ : Ring E
inst✝³ : Algebra F E
inst✝² : StrongRankCondition F
inst✝¹ : NoZeroSMulDivisors F E
inst✝ : Nontrivial E
this : Nontrivial F := Module.nontrivial F E
⊢ (#↑{1}) = 1

K : Type u
V : Type v
F : Type u_2
E : Type u_1
inst✝⁵ : CommRing F
inst✝⁴ : Ring E
inst✝³ : Algebra F E
inst✝² : StrongRankCondition F
inst✝¹ : NoZeroSMulDivisors F E
inst✝ : Nontrivial E
this : Nontrivial F := Module.nontrivial F E
⊢ LinearIndependent F fun x => ↑x
Theorem: List.map_add_range'
File: Std/Data/List/Lemmas.lean

tactic: simp [range', map_add_range' _ (s + step) n step, Nat.add_assoc]
state_before: a s n step : Nat
⊢ map (fun x => a + x) (range' s (n + 1) step) = range' (a + s) (n + 1) step
Theorem: LieSubalgebra.incl_range
File: Mathlib/Algebra/Lie/Subalgebra.lean

tactic: rw [← coe_to_submodule_eq_iff]
state_before: R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
⊢ LieHom.range (incl K) = K

tactic: exact (K : Submodule R L).range_subtype
state_before: R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
⊢ (LieHom.range (incl K)).toSubmodule = K.toSubmodule
Theorem: discreteTopology_subtype_iff
File: Mathlib/Topology/Constructions.lean

tactic: simp_rw [discreteTopology_iff_nhds_ne, SetCoe.forall', nhds_ne_subtype_eq_bot_iff]
state_before: α : Type u
β : Type v
γ : Type ?u.13446
δ : Type ?u.13449
ε : Type ?u.13452
ζ : Type ?u.13455
inst✝ : TopologicalSpace α
S : Set α
⊢ DiscreteTopology ↑S ↔ ∀ (x : α), x ∈ S → 𝓝[{x}ᶜ] x ⊓ 𝓟 S = ⊥
Theorem: PFun.mem_restrict
File: Mathlib/Data/PFun.lean

tactic: simp [restrict]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.13942
δ : Type ?u.13945
ε : Type ?u.13948
ι : Type ?u.13951
f : α →. β
s : Set α
h : s ⊆ Dom f
a : α
b : β
⊢ b ∈ restrict f h a ↔ a ∈ s ∧ b ∈ f a
Theorem: disjoint_principal_nhdsSet
File: Mathlib/Topology/NhdsSet.lean

tactic: rw [disjoint_principal_left, ← subset_interior_iff_mem_nhdsSet, interior_compl,
  subset_compl_iff_disjoint_left]
state_before: α : Type u_1
β : Type ?u.8192
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t s₁ s₂ t₁ t₂ : Set α
x : α
⊢ Disjoint (𝓟 s) (𝓝ˢ t) ↔ Disjoint (closure s) t
Theorem: compl_le_of_compl_le
File: Mathlib/Order/BooleanAlgebra.lean

tactic: simpa only [compl_compl] using compl_le_compl h
state_before: α : Type u
β : Type ?u.56679
w x y z : α
inst✝ : BooleanAlgebra α
h : yᶜ ≤ x
⊢ xᶜ ≤ y
Theorem: SimpleGraph.incMatrix_apply_eq_zero_iff
File: Mathlib/Combinatorics/SimpleGraph/IncMatrix.lean

tactic: simp only [incMatrix_apply, Set.indicator_apply_eq_zero, Pi.one_apply, one_ne_zero]
state_before: R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝¹ : MulZeroOneClass R
a b : α
e : Sym2 α
inst✝ : Nontrivial R
⊢ incMatrix R G a e = 0 ↔ ¬e ∈ incidenceSet G a
Theorem: mul_le_mul_of_mul_div_le
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [← mul_div_assoc] at h
state_before: ι : Type ?u.106331
α : Type u_1
β : Type ?u.106337
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h : a * (b / c) ≤ d
hc : 0 < c
⊢ b * a ≤ d * c

tactic: rwa [mul_comm b, ← div_le_iff hc]
state_before: ι : Type ?u.106331
α : Type u_1
β : Type ?u.106337
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h : a * b / c ≤ d
hc : 0 < c
⊢ b * a ≤ d * c
Theorem: MvPolynomial.finSuccEquiv_comp_C_eq_C
File: Mathlib/Data/MvPolynomial/Equiv.lean

tactic: refine' RingHom.ext fun x => _
state_before: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type ?u.975050
a a' a₁ a₂ : R✝
e : ℕ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R✝
n✝ : ℕ
R : Type u
inst✝ : CommSemiring R
n : ℕ
⊢ RingHom.comp (↑(AlgEquiv.symm (finSuccEquiv R n))) (RingHom.comp Polynomial.C C) = C

tactic: rw [RingHom.comp_apply]
state_before: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type ?u.975050
a a' a₁ a₂ : R✝
e : ℕ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R✝
n✝ : ℕ
R : Type u
inst✝ : CommSemiring R
n : ℕ
x : R
⊢ ↑(RingHom.comp (↑(AlgEquiv.symm (finSuccEquiv R n))) (RingHom.comp Polynomial.C C)) x = ↑C x

tactic: refine'
  (MvPolynomial.finSuccEquiv R n).injective
    (Trans.trans ((MvPolynomial.finSuccEquiv R n).apply_symm_apply _) _)
state_before: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type ?u.975050
a a' a₁ a₂ : R✝
e : ℕ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R✝
n✝ : ℕ
R : Type u
inst✝ : CommSemiring R
n : ℕ
x : R
⊢ ↑↑(AlgEquiv.symm (finSuccEquiv R n)) (↑(RingHom.comp Polynomial.C C) x) = ↑C x

tactic: simp only [MvPolynomial.finSuccEquiv_apply, MvPolynomial.eval₂Hom_C]
state_before: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type ?u.975050
a a' a₁ a₂ : R✝
e : ℕ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R✝
n✝ : ℕ
R : Type u
inst✝ : CommSemiring R
n : ℕ
x : R
⊢ ↑(RingHom.comp Polynomial.C C) x = ↑(finSuccEquiv R n) (↑C x)