Context stringlengths 57 6.04k | file_name stringlengths 21 79 | start int64 14 1.49k | end int64 18 1.5k | theorem stringlengths 25 1.55k | proof stringlengths 5 7.36k | num_lines int64 1 150 | complexity_score float64 2.72 139,370,958,066,637,970,000,000,000,000,000,000,000,000,000,000,000,000,000B | diff_level int64 0 2 | file_diff_level float64 0 2 | theorem_same_file int64 1 32 | rank_file int64 0 2.51k |
|---|---|---|---|---|---|---|---|---|---|---|---|
import Mathlib.Analysis.Convex.Between
import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
import Mathlib.Topology.MetricSpace.Holder
import Mathlib.Topology.MetricSpace.MetricSeparated
#align_import measure_theory.measure.hausdorff from "leanprover-community/mathlib"@"3d5c4a7a5fb0d982f97ed953161264f1dbd90ead"
open scoped NNReal ENNReal Topology
open EMetric Set Function Filter Encodable FiniteDimensional TopologicalSpace
noncomputable section
variable {ΞΉ X Y : Type*} [EMetricSpace X] [EMetricSpace Y]
namespace MeasureTheory
namespace OuterMeasure
def IsMetric (ΞΌ : OuterMeasure X) : Prop :=
β s t : Set X, IsMetricSeparated s t β ΞΌ (s βͺ t) = ΞΌ s + ΞΌ t
#align measure_theory.outer_measure.is_metric MeasureTheory.OuterMeasure.IsMetric
def mkMetric'.pre (m : Set X β ββ₯0β) (r : ββ₯0β) : OuterMeasure X :=
boundedBy <| extend fun s (_ : diam s β€ r) => m s
#align measure_theory.outer_measure.mk_metric'.pre MeasureTheory.OuterMeasure.mkMetric'.pre
def mkMetric' (m : Set X β ββ₯0β) : OuterMeasure X :=
β¨ r > 0, mkMetric'.pre m r
#align measure_theory.outer_measure.mk_metric' MeasureTheory.OuterMeasure.mkMetric'
def mkMetric (m : ββ₯0β β ββ₯0β) : OuterMeasure X :=
mkMetric' fun s => m (diam s)
#align measure_theory.outer_measure.mk_metric MeasureTheory.OuterMeasure.mkMetric
namespace mkMetric'
variable {m : Set X β ββ₯0β} {r : ββ₯0β} {ΞΌ : OuterMeasure X} {s : Set X}
theorem le_pre : ΞΌ β€ pre m r β β s : Set X, diam s β€ r β ΞΌ s β€ m s := by
simp only [pre, le_boundedBy, extend, le_iInf_iff]
#align measure_theory.outer_measure.mk_metric'.le_pre MeasureTheory.OuterMeasure.mkMetric'.le_pre
theorem pre_le (hs : diam s β€ r) : pre m r s β€ m s :=
(boundedBy_le _).trans <| iInf_le _ hs
#align measure_theory.outer_measure.mk_metric'.pre_le MeasureTheory.OuterMeasure.mkMetric'.pre_le
theorem mono_pre (m : Set X β ββ₯0β) {r r' : ββ₯0β} (h : r β€ r') : pre m r' β€ pre m r :=
le_pre.2 fun _ hs => pre_le (hs.trans h)
#align measure_theory.outer_measure.mk_metric'.mono_pre MeasureTheory.OuterMeasure.mkMetric'.mono_pre
theorem mono_pre_nat (m : Set X β ββ₯0β) : Monotone fun k : β => pre m kβ»ΒΉ :=
fun k l h => le_pre.2 fun s hs => pre_le (hs.trans <| by simpa)
#align measure_theory.outer_measure.mk_metric'.mono_pre_nat MeasureTheory.OuterMeasure.mkMetric'.mono_pre_nat
| Mathlib/MeasureTheory/Measure/Hausdorff.lean | 286 | 290 | theorem tendsto_pre (m : Set X β ββ₯0β) (s : Set X) :
Tendsto (fun r => pre m r s) (π[>] 0) (π <| mkMetric' m s) := by |
rw [β map_coe_Ioi_atBot, tendsto_map'_iff]
simp only [mkMetric', OuterMeasure.iSup_apply, iSup_subtype']
exact tendsto_atBot_iSup fun r r' hr => mono_pre _ hr _
| 3 | 20.085537 | 1 | 1.428571 | 7 | 1,520 |
import Mathlib.Analysis.Convex.Between
import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
import Mathlib.Topology.MetricSpace.Holder
import Mathlib.Topology.MetricSpace.MetricSeparated
#align_import measure_theory.measure.hausdorff from "leanprover-community/mathlib"@"3d5c4a7a5fb0d982f97ed953161264f1dbd90ead"
open scoped NNReal ENNReal Topology
open EMetric Set Function Filter Encodable FiniteDimensional TopologicalSpace
noncomputable section
variable {ΞΉ X Y : Type*} [EMetricSpace X] [EMetricSpace Y]
namespace MeasureTheory
namespace OuterMeasure
def IsMetric (ΞΌ : OuterMeasure X) : Prop :=
β s t : Set X, IsMetricSeparated s t β ΞΌ (s βͺ t) = ΞΌ s + ΞΌ t
#align measure_theory.outer_measure.is_metric MeasureTheory.OuterMeasure.IsMetric
def mkMetric'.pre (m : Set X β ββ₯0β) (r : ββ₯0β) : OuterMeasure X :=
boundedBy <| extend fun s (_ : diam s β€ r) => m s
#align measure_theory.outer_measure.mk_metric'.pre MeasureTheory.OuterMeasure.mkMetric'.pre
def mkMetric' (m : Set X β ββ₯0β) : OuterMeasure X :=
β¨ r > 0, mkMetric'.pre m r
#align measure_theory.outer_measure.mk_metric' MeasureTheory.OuterMeasure.mkMetric'
def mkMetric (m : ββ₯0β β ββ₯0β) : OuterMeasure X :=
mkMetric' fun s => m (diam s)
#align measure_theory.outer_measure.mk_metric MeasureTheory.OuterMeasure.mkMetric
namespace mkMetric'
variable {m : Set X β ββ₯0β} {r : ββ₯0β} {ΞΌ : OuterMeasure X} {s : Set X}
theorem le_pre : ΞΌ β€ pre m r β β s : Set X, diam s β€ r β ΞΌ s β€ m s := by
simp only [pre, le_boundedBy, extend, le_iInf_iff]
#align measure_theory.outer_measure.mk_metric'.le_pre MeasureTheory.OuterMeasure.mkMetric'.le_pre
theorem pre_le (hs : diam s β€ r) : pre m r s β€ m s :=
(boundedBy_le _).trans <| iInf_le _ hs
#align measure_theory.outer_measure.mk_metric'.pre_le MeasureTheory.OuterMeasure.mkMetric'.pre_le
theorem mono_pre (m : Set X β ββ₯0β) {r r' : ββ₯0β} (h : r β€ r') : pre m r' β€ pre m r :=
le_pre.2 fun _ hs => pre_le (hs.trans h)
#align measure_theory.outer_measure.mk_metric'.mono_pre MeasureTheory.OuterMeasure.mkMetric'.mono_pre
theorem mono_pre_nat (m : Set X β ββ₯0β) : Monotone fun k : β => pre m kβ»ΒΉ :=
fun k l h => le_pre.2 fun s hs => pre_le (hs.trans <| by simpa)
#align measure_theory.outer_measure.mk_metric'.mono_pre_nat MeasureTheory.OuterMeasure.mkMetric'.mono_pre_nat
theorem tendsto_pre (m : Set X β ββ₯0β) (s : Set X) :
Tendsto (fun r => pre m r s) (π[>] 0) (π <| mkMetric' m s) := by
rw [β map_coe_Ioi_atBot, tendsto_map'_iff]
simp only [mkMetric', OuterMeasure.iSup_apply, iSup_subtype']
exact tendsto_atBot_iSup fun r r' hr => mono_pre _ hr _
#align measure_theory.outer_measure.mk_metric'.tendsto_pre MeasureTheory.OuterMeasure.mkMetric'.tendsto_pre
| Mathlib/MeasureTheory/Measure/Hausdorff.lean | 293 | 297 | theorem tendsto_pre_nat (m : Set X β ββ₯0β) (s : Set X) :
Tendsto (fun n : β => pre m nβ»ΒΉ s) atTop (π <| mkMetric' m s) := by |
refine (tendsto_pre m s).comp (tendsto_inf.2 β¨ENNReal.tendsto_inv_nat_nhds_zero, ?_β©)
refine tendsto_principal.2 (eventually_of_forall fun n => ?_)
simp
| 3 | 20.085537 | 1 | 1.428571 | 7 | 1,520 |
import Mathlib.Analysis.Convex.Between
import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
import Mathlib.Topology.MetricSpace.Holder
import Mathlib.Topology.MetricSpace.MetricSeparated
#align_import measure_theory.measure.hausdorff from "leanprover-community/mathlib"@"3d5c4a7a5fb0d982f97ed953161264f1dbd90ead"
open scoped NNReal ENNReal Topology
open EMetric Set Function Filter Encodable FiniteDimensional TopologicalSpace
noncomputable section
variable {ΞΉ X Y : Type*} [EMetricSpace X] [EMetricSpace Y]
namespace MeasureTheory
namespace OuterMeasure
def IsMetric (ΞΌ : OuterMeasure X) : Prop :=
β s t : Set X, IsMetricSeparated s t β ΞΌ (s βͺ t) = ΞΌ s + ΞΌ t
#align measure_theory.outer_measure.is_metric MeasureTheory.OuterMeasure.IsMetric
def mkMetric'.pre (m : Set X β ββ₯0β) (r : ββ₯0β) : OuterMeasure X :=
boundedBy <| extend fun s (_ : diam s β€ r) => m s
#align measure_theory.outer_measure.mk_metric'.pre MeasureTheory.OuterMeasure.mkMetric'.pre
def mkMetric' (m : Set X β ββ₯0β) : OuterMeasure X :=
β¨ r > 0, mkMetric'.pre m r
#align measure_theory.outer_measure.mk_metric' MeasureTheory.OuterMeasure.mkMetric'
def mkMetric (m : ββ₯0β β ββ₯0β) : OuterMeasure X :=
mkMetric' fun s => m (diam s)
#align measure_theory.outer_measure.mk_metric MeasureTheory.OuterMeasure.mkMetric
namespace mkMetric'
variable {m : Set X β ββ₯0β} {r : ββ₯0β} {ΞΌ : OuterMeasure X} {s : Set X}
theorem le_pre : ΞΌ β€ pre m r β β s : Set X, diam s β€ r β ΞΌ s β€ m s := by
simp only [pre, le_boundedBy, extend, le_iInf_iff]
#align measure_theory.outer_measure.mk_metric'.le_pre MeasureTheory.OuterMeasure.mkMetric'.le_pre
theorem pre_le (hs : diam s β€ r) : pre m r s β€ m s :=
(boundedBy_le _).trans <| iInf_le _ hs
#align measure_theory.outer_measure.mk_metric'.pre_le MeasureTheory.OuterMeasure.mkMetric'.pre_le
theorem mono_pre (m : Set X β ββ₯0β) {r r' : ββ₯0β} (h : r β€ r') : pre m r' β€ pre m r :=
le_pre.2 fun _ hs => pre_le (hs.trans h)
#align measure_theory.outer_measure.mk_metric'.mono_pre MeasureTheory.OuterMeasure.mkMetric'.mono_pre
theorem mono_pre_nat (m : Set X β ββ₯0β) : Monotone fun k : β => pre m kβ»ΒΉ :=
fun k l h => le_pre.2 fun s hs => pre_le (hs.trans <| by simpa)
#align measure_theory.outer_measure.mk_metric'.mono_pre_nat MeasureTheory.OuterMeasure.mkMetric'.mono_pre_nat
theorem tendsto_pre (m : Set X β ββ₯0β) (s : Set X) :
Tendsto (fun r => pre m r s) (π[>] 0) (π <| mkMetric' m s) := by
rw [β map_coe_Ioi_atBot, tendsto_map'_iff]
simp only [mkMetric', OuterMeasure.iSup_apply, iSup_subtype']
exact tendsto_atBot_iSup fun r r' hr => mono_pre _ hr _
#align measure_theory.outer_measure.mk_metric'.tendsto_pre MeasureTheory.OuterMeasure.mkMetric'.tendsto_pre
theorem tendsto_pre_nat (m : Set X β ββ₯0β) (s : Set X) :
Tendsto (fun n : β => pre m nβ»ΒΉ s) atTop (π <| mkMetric' m s) := by
refine (tendsto_pre m s).comp (tendsto_inf.2 β¨ENNReal.tendsto_inv_nat_nhds_zero, ?_β©)
refine tendsto_principal.2 (eventually_of_forall fun n => ?_)
simp
#align measure_theory.outer_measure.mk_metric'.tendsto_pre_nat MeasureTheory.OuterMeasure.mkMetric'.tendsto_pre_nat
| Mathlib/MeasureTheory/Measure/Hausdorff.lean | 300 | 304 | theorem eq_iSup_nat (m : Set X β ββ₯0β) : mkMetric' m = β¨ n : β, mkMetric'.pre m nβ»ΒΉ := by |
ext1 s
rw [iSup_apply]
refine tendsto_nhds_unique (mkMetric'.tendsto_pre_nat m s)
(tendsto_atTop_iSup fun k l hkl => mkMetric'.mono_pre_nat m hkl s)
| 4 | 54.59815 | 2 | 1.428571 | 7 | 1,520 |
import Mathlib.Analysis.Convex.Between
import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
import Mathlib.Topology.MetricSpace.Holder
import Mathlib.Topology.MetricSpace.MetricSeparated
#align_import measure_theory.measure.hausdorff from "leanprover-community/mathlib"@"3d5c4a7a5fb0d982f97ed953161264f1dbd90ead"
open scoped NNReal ENNReal Topology
open EMetric Set Function Filter Encodable FiniteDimensional TopologicalSpace
noncomputable section
variable {ΞΉ X Y : Type*} [EMetricSpace X] [EMetricSpace Y]
namespace MeasureTheory
namespace OuterMeasure
def IsMetric (ΞΌ : OuterMeasure X) : Prop :=
β s t : Set X, IsMetricSeparated s t β ΞΌ (s βͺ t) = ΞΌ s + ΞΌ t
#align measure_theory.outer_measure.is_metric MeasureTheory.OuterMeasure.IsMetric
def mkMetric'.pre (m : Set X β ββ₯0β) (r : ββ₯0β) : OuterMeasure X :=
boundedBy <| extend fun s (_ : diam s β€ r) => m s
#align measure_theory.outer_measure.mk_metric'.pre MeasureTheory.OuterMeasure.mkMetric'.pre
def mkMetric' (m : Set X β ββ₯0β) : OuterMeasure X :=
β¨ r > 0, mkMetric'.pre m r
#align measure_theory.outer_measure.mk_metric' MeasureTheory.OuterMeasure.mkMetric'
def mkMetric (m : ββ₯0β β ββ₯0β) : OuterMeasure X :=
mkMetric' fun s => m (diam s)
#align measure_theory.outer_measure.mk_metric MeasureTheory.OuterMeasure.mkMetric
namespace mkMetric'
variable {m : Set X β ββ₯0β} {r : ββ₯0β} {ΞΌ : OuterMeasure X} {s : Set X}
theorem le_pre : ΞΌ β€ pre m r β β s : Set X, diam s β€ r β ΞΌ s β€ m s := by
simp only [pre, le_boundedBy, extend, le_iInf_iff]
#align measure_theory.outer_measure.mk_metric'.le_pre MeasureTheory.OuterMeasure.mkMetric'.le_pre
theorem pre_le (hs : diam s β€ r) : pre m r s β€ m s :=
(boundedBy_le _).trans <| iInf_le _ hs
#align measure_theory.outer_measure.mk_metric'.pre_le MeasureTheory.OuterMeasure.mkMetric'.pre_le
theorem mono_pre (m : Set X β ββ₯0β) {r r' : ββ₯0β} (h : r β€ r') : pre m r' β€ pre m r :=
le_pre.2 fun _ hs => pre_le (hs.trans h)
#align measure_theory.outer_measure.mk_metric'.mono_pre MeasureTheory.OuterMeasure.mkMetric'.mono_pre
theorem mono_pre_nat (m : Set X β ββ₯0β) : Monotone fun k : β => pre m kβ»ΒΉ :=
fun k l h => le_pre.2 fun s hs => pre_le (hs.trans <| by simpa)
#align measure_theory.outer_measure.mk_metric'.mono_pre_nat MeasureTheory.OuterMeasure.mkMetric'.mono_pre_nat
theorem tendsto_pre (m : Set X β ββ₯0β) (s : Set X) :
Tendsto (fun r => pre m r s) (π[>] 0) (π <| mkMetric' m s) := by
rw [β map_coe_Ioi_atBot, tendsto_map'_iff]
simp only [mkMetric', OuterMeasure.iSup_apply, iSup_subtype']
exact tendsto_atBot_iSup fun r r' hr => mono_pre _ hr _
#align measure_theory.outer_measure.mk_metric'.tendsto_pre MeasureTheory.OuterMeasure.mkMetric'.tendsto_pre
theorem tendsto_pre_nat (m : Set X β ββ₯0β) (s : Set X) :
Tendsto (fun n : β => pre m nβ»ΒΉ s) atTop (π <| mkMetric' m s) := by
refine (tendsto_pre m s).comp (tendsto_inf.2 β¨ENNReal.tendsto_inv_nat_nhds_zero, ?_β©)
refine tendsto_principal.2 (eventually_of_forall fun n => ?_)
simp
#align measure_theory.outer_measure.mk_metric'.tendsto_pre_nat MeasureTheory.OuterMeasure.mkMetric'.tendsto_pre_nat
theorem eq_iSup_nat (m : Set X β ββ₯0β) : mkMetric' m = β¨ n : β, mkMetric'.pre m nβ»ΒΉ := by
ext1 s
rw [iSup_apply]
refine tendsto_nhds_unique (mkMetric'.tendsto_pre_nat m s)
(tendsto_atTop_iSup fun k l hkl => mkMetric'.mono_pre_nat m hkl s)
#align measure_theory.outer_measure.mk_metric'.eq_supr_nat MeasureTheory.OuterMeasure.mkMetric'.eq_iSup_nat
| Mathlib/MeasureTheory/Measure/Hausdorff.lean | 309 | 315 | theorem trim_pre [MeasurableSpace X] [OpensMeasurableSpace X] (m : Set X β ββ₯0β)
(hcl : β s, m (closure s) = m s) (r : ββ₯0β) : (pre m r).trim = pre m r := by |
refine le_antisymm (le_pre.2 fun s hs => ?_) (le_trim _)
rw [trim_eq_iInf]
refine iInf_le_of_le (closure s) <| iInf_le_of_le subset_closure <|
iInf_le_of_le measurableSet_closure ((pre_le ?_).trans_eq (hcl _))
rwa [diam_closure]
| 5 | 148.413159 | 2 | 1.428571 | 7 | 1,520 |
import Mathlib.SetTheory.Game.State
#align_import set_theory.game.domineering from "leanprover-community/mathlib"@"b134b2f5cf6dd25d4bbfd3c498b6e36c11a17225"
namespace SetTheory
namespace PGame
namespace Domineering
open Function
@[simps!]
def shiftUp : β€ Γ β€ β β€ Γ β€ :=
(Equiv.refl β€).prodCongr (Equiv.addRight (1 : β€))
#align pgame.domineering.shift_up SetTheory.PGame.Domineering.shiftUp
@[simps!]
def shiftRight : β€ Γ β€ β β€ Γ β€ :=
(Equiv.addRight (1 : β€)).prodCongr (Equiv.refl β€)
#align pgame.domineering.shift_right SetTheory.PGame.Domineering.shiftRight
-- Porting note: reducibility cannot be `local`. For now there are no dependents of this file so
-- being globally reducible is fine.
abbrev Board :=
Finset (β€ Γ β€)
#align pgame.domineering.board SetTheory.PGame.Domineering.Board
def left (b : Board) : Finset (β€ Γ β€) :=
b β© b.map shiftUp
#align pgame.domineering.left SetTheory.PGame.Domineering.left
def right (b : Board) : Finset (β€ Γ β€) :=
b β© b.map shiftRight
#align pgame.domineering.right SetTheory.PGame.Domineering.right
theorem mem_left {b : Board} (x : β€ Γ β€) : x β left b β x β b β§ (x.1, x.2 - 1) β b :=
Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv)
#align pgame.domineering.mem_left SetTheory.PGame.Domineering.mem_left
theorem mem_right {b : Board} (x : β€ Γ β€) : x β right b β x β b β§ (x.1 - 1, x.2) β b :=
Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv)
#align pgame.domineering.mem_right SetTheory.PGame.Domineering.mem_right
def moveLeft (b : Board) (m : β€ Γ β€) : Board :=
(b.erase m).erase (m.1, m.2 - 1)
#align pgame.domineering.move_left SetTheory.PGame.Domineering.moveLeft
def moveRight (b : Board) (m : β€ Γ β€) : Board :=
(b.erase m).erase (m.1 - 1, m.2)
#align pgame.domineering.move_right SetTheory.PGame.Domineering.moveRight
| Mathlib/SetTheory/Game/Domineering.lean | 79 | 83 | theorem fst_pred_mem_erase_of_mem_right {b : Board} {m : β€ Γ β€} (h : m β right b) :
(m.1 - 1, m.2) β b.erase m := by |
rw [mem_right] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.fst (pred_ne_self m.1)
| 3 | 20.085537 | 1 | 1.428571 | 7 | 1,521 |
import Mathlib.SetTheory.Game.State
#align_import set_theory.game.domineering from "leanprover-community/mathlib"@"b134b2f5cf6dd25d4bbfd3c498b6e36c11a17225"
namespace SetTheory
namespace PGame
namespace Domineering
open Function
@[simps!]
def shiftUp : β€ Γ β€ β β€ Γ β€ :=
(Equiv.refl β€).prodCongr (Equiv.addRight (1 : β€))
#align pgame.domineering.shift_up SetTheory.PGame.Domineering.shiftUp
@[simps!]
def shiftRight : β€ Γ β€ β β€ Γ β€ :=
(Equiv.addRight (1 : β€)).prodCongr (Equiv.refl β€)
#align pgame.domineering.shift_right SetTheory.PGame.Domineering.shiftRight
-- Porting note: reducibility cannot be `local`. For now there are no dependents of this file so
-- being globally reducible is fine.
abbrev Board :=
Finset (β€ Γ β€)
#align pgame.domineering.board SetTheory.PGame.Domineering.Board
def left (b : Board) : Finset (β€ Γ β€) :=
b β© b.map shiftUp
#align pgame.domineering.left SetTheory.PGame.Domineering.left
def right (b : Board) : Finset (β€ Γ β€) :=
b β© b.map shiftRight
#align pgame.domineering.right SetTheory.PGame.Domineering.right
theorem mem_left {b : Board} (x : β€ Γ β€) : x β left b β x β b β§ (x.1, x.2 - 1) β b :=
Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv)
#align pgame.domineering.mem_left SetTheory.PGame.Domineering.mem_left
theorem mem_right {b : Board} (x : β€ Γ β€) : x β right b β x β b β§ (x.1 - 1, x.2) β b :=
Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv)
#align pgame.domineering.mem_right SetTheory.PGame.Domineering.mem_right
def moveLeft (b : Board) (m : β€ Γ β€) : Board :=
(b.erase m).erase (m.1, m.2 - 1)
#align pgame.domineering.move_left SetTheory.PGame.Domineering.moveLeft
def moveRight (b : Board) (m : β€ Γ β€) : Board :=
(b.erase m).erase (m.1 - 1, m.2)
#align pgame.domineering.move_right SetTheory.PGame.Domineering.moveRight
theorem fst_pred_mem_erase_of_mem_right {b : Board} {m : β€ Γ β€} (h : m β right b) :
(m.1 - 1, m.2) β b.erase m := by
rw [mem_right] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.fst (pred_ne_self m.1)
#align pgame.domineering.fst_pred_mem_erase_of_mem_right SetTheory.PGame.Domineering.fst_pred_mem_erase_of_mem_right
| Mathlib/SetTheory/Game/Domineering.lean | 86 | 90 | theorem snd_pred_mem_erase_of_mem_left {b : Board} {m : β€ Γ β€} (h : m β left b) :
(m.1, m.2 - 1) β b.erase m := by |
rw [mem_left] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.snd (pred_ne_self m.2)
| 3 | 20.085537 | 1 | 1.428571 | 7 | 1,521 |
import Mathlib.SetTheory.Game.State
#align_import set_theory.game.domineering from "leanprover-community/mathlib"@"b134b2f5cf6dd25d4bbfd3c498b6e36c11a17225"
namespace SetTheory
namespace PGame
namespace Domineering
open Function
@[simps!]
def shiftUp : β€ Γ β€ β β€ Γ β€ :=
(Equiv.refl β€).prodCongr (Equiv.addRight (1 : β€))
#align pgame.domineering.shift_up SetTheory.PGame.Domineering.shiftUp
@[simps!]
def shiftRight : β€ Γ β€ β β€ Γ β€ :=
(Equiv.addRight (1 : β€)).prodCongr (Equiv.refl β€)
#align pgame.domineering.shift_right SetTheory.PGame.Domineering.shiftRight
-- Porting note: reducibility cannot be `local`. For now there are no dependents of this file so
-- being globally reducible is fine.
abbrev Board :=
Finset (β€ Γ β€)
#align pgame.domineering.board SetTheory.PGame.Domineering.Board
def left (b : Board) : Finset (β€ Γ β€) :=
b β© b.map shiftUp
#align pgame.domineering.left SetTheory.PGame.Domineering.left
def right (b : Board) : Finset (β€ Γ β€) :=
b β© b.map shiftRight
#align pgame.domineering.right SetTheory.PGame.Domineering.right
theorem mem_left {b : Board} (x : β€ Γ β€) : x β left b β x β b β§ (x.1, x.2 - 1) β b :=
Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv)
#align pgame.domineering.mem_left SetTheory.PGame.Domineering.mem_left
theorem mem_right {b : Board} (x : β€ Γ β€) : x β right b β x β b β§ (x.1 - 1, x.2) β b :=
Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv)
#align pgame.domineering.mem_right SetTheory.PGame.Domineering.mem_right
def moveLeft (b : Board) (m : β€ Γ β€) : Board :=
(b.erase m).erase (m.1, m.2 - 1)
#align pgame.domineering.move_left SetTheory.PGame.Domineering.moveLeft
def moveRight (b : Board) (m : β€ Γ β€) : Board :=
(b.erase m).erase (m.1 - 1, m.2)
#align pgame.domineering.move_right SetTheory.PGame.Domineering.moveRight
theorem fst_pred_mem_erase_of_mem_right {b : Board} {m : β€ Γ β€} (h : m β right b) :
(m.1 - 1, m.2) β b.erase m := by
rw [mem_right] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.fst (pred_ne_self m.1)
#align pgame.domineering.fst_pred_mem_erase_of_mem_right SetTheory.PGame.Domineering.fst_pred_mem_erase_of_mem_right
theorem snd_pred_mem_erase_of_mem_left {b : Board} {m : β€ Γ β€} (h : m β left b) :
(m.1, m.2 - 1) β b.erase m := by
rw [mem_left] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.snd (pred_ne_self m.2)
#align pgame.domineering.snd_pred_mem_erase_of_mem_left SetTheory.PGame.Domineering.snd_pred_mem_erase_of_mem_left
| Mathlib/SetTheory/Game/Domineering.lean | 93 | 98 | theorem card_of_mem_left {b : Board} {m : β€ Γ β€} (h : m β left b) : 2 β€ Finset.card b := by |
have wβ : m β b := (Finset.mem_inter.1 h).1
have wβ : (m.1, m.2 - 1) β b.erase m := snd_pred_mem_erase_of_mem_left h
have iβ := Finset.card_erase_lt_of_mem wβ
have iβ := Nat.lt_of_le_of_lt (Nat.zero_le _) (Finset.card_erase_lt_of_mem wβ)
exact Nat.lt_of_le_of_lt iβ iβ
| 5 | 148.413159 | 2 | 1.428571 | 7 | 1,521 |
import Mathlib.SetTheory.Game.State
#align_import set_theory.game.domineering from "leanprover-community/mathlib"@"b134b2f5cf6dd25d4bbfd3c498b6e36c11a17225"
namespace SetTheory
namespace PGame
namespace Domineering
open Function
@[simps!]
def shiftUp : β€ Γ β€ β β€ Γ β€ :=
(Equiv.refl β€).prodCongr (Equiv.addRight (1 : β€))
#align pgame.domineering.shift_up SetTheory.PGame.Domineering.shiftUp
@[simps!]
def shiftRight : β€ Γ β€ β β€ Γ β€ :=
(Equiv.addRight (1 : β€)).prodCongr (Equiv.refl β€)
#align pgame.domineering.shift_right SetTheory.PGame.Domineering.shiftRight
-- Porting note: reducibility cannot be `local`. For now there are no dependents of this file so
-- being globally reducible is fine.
abbrev Board :=
Finset (β€ Γ β€)
#align pgame.domineering.board SetTheory.PGame.Domineering.Board
def left (b : Board) : Finset (β€ Γ β€) :=
b β© b.map shiftUp
#align pgame.domineering.left SetTheory.PGame.Domineering.left
def right (b : Board) : Finset (β€ Γ β€) :=
b β© b.map shiftRight
#align pgame.domineering.right SetTheory.PGame.Domineering.right
theorem mem_left {b : Board} (x : β€ Γ β€) : x β left b β x β b β§ (x.1, x.2 - 1) β b :=
Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv)
#align pgame.domineering.mem_left SetTheory.PGame.Domineering.mem_left
theorem mem_right {b : Board} (x : β€ Γ β€) : x β right b β x β b β§ (x.1 - 1, x.2) β b :=
Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv)
#align pgame.domineering.mem_right SetTheory.PGame.Domineering.mem_right
def moveLeft (b : Board) (m : β€ Γ β€) : Board :=
(b.erase m).erase (m.1, m.2 - 1)
#align pgame.domineering.move_left SetTheory.PGame.Domineering.moveLeft
def moveRight (b : Board) (m : β€ Γ β€) : Board :=
(b.erase m).erase (m.1 - 1, m.2)
#align pgame.domineering.move_right SetTheory.PGame.Domineering.moveRight
theorem fst_pred_mem_erase_of_mem_right {b : Board} {m : β€ Γ β€} (h : m β right b) :
(m.1 - 1, m.2) β b.erase m := by
rw [mem_right] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.fst (pred_ne_self m.1)
#align pgame.domineering.fst_pred_mem_erase_of_mem_right SetTheory.PGame.Domineering.fst_pred_mem_erase_of_mem_right
theorem snd_pred_mem_erase_of_mem_left {b : Board} {m : β€ Γ β€} (h : m β left b) :
(m.1, m.2 - 1) β b.erase m := by
rw [mem_left] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.snd (pred_ne_self m.2)
#align pgame.domineering.snd_pred_mem_erase_of_mem_left SetTheory.PGame.Domineering.snd_pred_mem_erase_of_mem_left
theorem card_of_mem_left {b : Board} {m : β€ Γ β€} (h : m β left b) : 2 β€ Finset.card b := by
have wβ : m β b := (Finset.mem_inter.1 h).1
have wβ : (m.1, m.2 - 1) β b.erase m := snd_pred_mem_erase_of_mem_left h
have iβ := Finset.card_erase_lt_of_mem wβ
have iβ := Nat.lt_of_le_of_lt (Nat.zero_le _) (Finset.card_erase_lt_of_mem wβ)
exact Nat.lt_of_le_of_lt iβ iβ
#align pgame.domineering.card_of_mem_left SetTheory.PGame.Domineering.card_of_mem_left
| Mathlib/SetTheory/Game/Domineering.lean | 101 | 106 | theorem card_of_mem_right {b : Board} {m : β€ Γ β€} (h : m β right b) : 2 β€ Finset.card b := by |
have wβ : m β b := (Finset.mem_inter.1 h).1
have wβ := fst_pred_mem_erase_of_mem_right h
have iβ := Finset.card_erase_lt_of_mem wβ
have iβ := Nat.lt_of_le_of_lt (Nat.zero_le _) (Finset.card_erase_lt_of_mem wβ)
exact Nat.lt_of_le_of_lt iβ iβ
| 5 | 148.413159 | 2 | 1.428571 | 7 | 1,521 |
import Mathlib.SetTheory.Game.State
#align_import set_theory.game.domineering from "leanprover-community/mathlib"@"b134b2f5cf6dd25d4bbfd3c498b6e36c11a17225"
namespace SetTheory
namespace PGame
namespace Domineering
open Function
@[simps!]
def shiftUp : β€ Γ β€ β β€ Γ β€ :=
(Equiv.refl β€).prodCongr (Equiv.addRight (1 : β€))
#align pgame.domineering.shift_up SetTheory.PGame.Domineering.shiftUp
@[simps!]
def shiftRight : β€ Γ β€ β β€ Γ β€ :=
(Equiv.addRight (1 : β€)).prodCongr (Equiv.refl β€)
#align pgame.domineering.shift_right SetTheory.PGame.Domineering.shiftRight
-- Porting note: reducibility cannot be `local`. For now there are no dependents of this file so
-- being globally reducible is fine.
abbrev Board :=
Finset (β€ Γ β€)
#align pgame.domineering.board SetTheory.PGame.Domineering.Board
def left (b : Board) : Finset (β€ Γ β€) :=
b β© b.map shiftUp
#align pgame.domineering.left SetTheory.PGame.Domineering.left
def right (b : Board) : Finset (β€ Γ β€) :=
b β© b.map shiftRight
#align pgame.domineering.right SetTheory.PGame.Domineering.right
theorem mem_left {b : Board} (x : β€ Γ β€) : x β left b β x β b β§ (x.1, x.2 - 1) β b :=
Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv)
#align pgame.domineering.mem_left SetTheory.PGame.Domineering.mem_left
theorem mem_right {b : Board} (x : β€ Γ β€) : x β right b β x β b β§ (x.1 - 1, x.2) β b :=
Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv)
#align pgame.domineering.mem_right SetTheory.PGame.Domineering.mem_right
def moveLeft (b : Board) (m : β€ Γ β€) : Board :=
(b.erase m).erase (m.1, m.2 - 1)
#align pgame.domineering.move_left SetTheory.PGame.Domineering.moveLeft
def moveRight (b : Board) (m : β€ Γ β€) : Board :=
(b.erase m).erase (m.1 - 1, m.2)
#align pgame.domineering.move_right SetTheory.PGame.Domineering.moveRight
theorem fst_pred_mem_erase_of_mem_right {b : Board} {m : β€ Γ β€} (h : m β right b) :
(m.1 - 1, m.2) β b.erase m := by
rw [mem_right] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.fst (pred_ne_self m.1)
#align pgame.domineering.fst_pred_mem_erase_of_mem_right SetTheory.PGame.Domineering.fst_pred_mem_erase_of_mem_right
theorem snd_pred_mem_erase_of_mem_left {b : Board} {m : β€ Γ β€} (h : m β left b) :
(m.1, m.2 - 1) β b.erase m := by
rw [mem_left] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.snd (pred_ne_self m.2)
#align pgame.domineering.snd_pred_mem_erase_of_mem_left SetTheory.PGame.Domineering.snd_pred_mem_erase_of_mem_left
theorem card_of_mem_left {b : Board} {m : β€ Γ β€} (h : m β left b) : 2 β€ Finset.card b := by
have wβ : m β b := (Finset.mem_inter.1 h).1
have wβ : (m.1, m.2 - 1) β b.erase m := snd_pred_mem_erase_of_mem_left h
have iβ := Finset.card_erase_lt_of_mem wβ
have iβ := Nat.lt_of_le_of_lt (Nat.zero_le _) (Finset.card_erase_lt_of_mem wβ)
exact Nat.lt_of_le_of_lt iβ iβ
#align pgame.domineering.card_of_mem_left SetTheory.PGame.Domineering.card_of_mem_left
theorem card_of_mem_right {b : Board} {m : β€ Γ β€} (h : m β right b) : 2 β€ Finset.card b := by
have wβ : m β b := (Finset.mem_inter.1 h).1
have wβ := fst_pred_mem_erase_of_mem_right h
have iβ := Finset.card_erase_lt_of_mem wβ
have iβ := Nat.lt_of_le_of_lt (Nat.zero_le _) (Finset.card_erase_lt_of_mem wβ)
exact Nat.lt_of_le_of_lt iβ iβ
#align pgame.domineering.card_of_mem_right SetTheory.PGame.Domineering.card_of_mem_right
| Mathlib/SetTheory/Game/Domineering.lean | 109 | 114 | theorem moveLeft_card {b : Board} {m : β€ Γ β€} (h : m β left b) :
Finset.card (moveLeft b m) + 2 = Finset.card b := by |
dsimp [moveLeft]
rw [Finset.card_erase_of_mem (snd_pred_mem_erase_of_mem_left h)]
rw [Finset.card_erase_of_mem (Finset.mem_of_mem_inter_left h)]
exact tsub_add_cancel_of_le (card_of_mem_left h)
| 4 | 54.59815 | 2 | 1.428571 | 7 | 1,521 |
import Mathlib.SetTheory.Game.State
#align_import set_theory.game.domineering from "leanprover-community/mathlib"@"b134b2f5cf6dd25d4bbfd3c498b6e36c11a17225"
namespace SetTheory
namespace PGame
namespace Domineering
open Function
@[simps!]
def shiftUp : β€ Γ β€ β β€ Γ β€ :=
(Equiv.refl β€).prodCongr (Equiv.addRight (1 : β€))
#align pgame.domineering.shift_up SetTheory.PGame.Domineering.shiftUp
@[simps!]
def shiftRight : β€ Γ β€ β β€ Γ β€ :=
(Equiv.addRight (1 : β€)).prodCongr (Equiv.refl β€)
#align pgame.domineering.shift_right SetTheory.PGame.Domineering.shiftRight
-- Porting note: reducibility cannot be `local`. For now there are no dependents of this file so
-- being globally reducible is fine.
abbrev Board :=
Finset (β€ Γ β€)
#align pgame.domineering.board SetTheory.PGame.Domineering.Board
def left (b : Board) : Finset (β€ Γ β€) :=
b β© b.map shiftUp
#align pgame.domineering.left SetTheory.PGame.Domineering.left
def right (b : Board) : Finset (β€ Γ β€) :=
b β© b.map shiftRight
#align pgame.domineering.right SetTheory.PGame.Domineering.right
theorem mem_left {b : Board} (x : β€ Γ β€) : x β left b β x β b β§ (x.1, x.2 - 1) β b :=
Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv)
#align pgame.domineering.mem_left SetTheory.PGame.Domineering.mem_left
theorem mem_right {b : Board} (x : β€ Γ β€) : x β right b β x β b β§ (x.1 - 1, x.2) β b :=
Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv)
#align pgame.domineering.mem_right SetTheory.PGame.Domineering.mem_right
def moveLeft (b : Board) (m : β€ Γ β€) : Board :=
(b.erase m).erase (m.1, m.2 - 1)
#align pgame.domineering.move_left SetTheory.PGame.Domineering.moveLeft
def moveRight (b : Board) (m : β€ Γ β€) : Board :=
(b.erase m).erase (m.1 - 1, m.2)
#align pgame.domineering.move_right SetTheory.PGame.Domineering.moveRight
theorem fst_pred_mem_erase_of_mem_right {b : Board} {m : β€ Γ β€} (h : m β right b) :
(m.1 - 1, m.2) β b.erase m := by
rw [mem_right] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.fst (pred_ne_self m.1)
#align pgame.domineering.fst_pred_mem_erase_of_mem_right SetTheory.PGame.Domineering.fst_pred_mem_erase_of_mem_right
theorem snd_pred_mem_erase_of_mem_left {b : Board} {m : β€ Γ β€} (h : m β left b) :
(m.1, m.2 - 1) β b.erase m := by
rw [mem_left] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.snd (pred_ne_self m.2)
#align pgame.domineering.snd_pred_mem_erase_of_mem_left SetTheory.PGame.Domineering.snd_pred_mem_erase_of_mem_left
theorem card_of_mem_left {b : Board} {m : β€ Γ β€} (h : m β left b) : 2 β€ Finset.card b := by
have wβ : m β b := (Finset.mem_inter.1 h).1
have wβ : (m.1, m.2 - 1) β b.erase m := snd_pred_mem_erase_of_mem_left h
have iβ := Finset.card_erase_lt_of_mem wβ
have iβ := Nat.lt_of_le_of_lt (Nat.zero_le _) (Finset.card_erase_lt_of_mem wβ)
exact Nat.lt_of_le_of_lt iβ iβ
#align pgame.domineering.card_of_mem_left SetTheory.PGame.Domineering.card_of_mem_left
theorem card_of_mem_right {b : Board} {m : β€ Γ β€} (h : m β right b) : 2 β€ Finset.card b := by
have wβ : m β b := (Finset.mem_inter.1 h).1
have wβ := fst_pred_mem_erase_of_mem_right h
have iβ := Finset.card_erase_lt_of_mem wβ
have iβ := Nat.lt_of_le_of_lt (Nat.zero_le _) (Finset.card_erase_lt_of_mem wβ)
exact Nat.lt_of_le_of_lt iβ iβ
#align pgame.domineering.card_of_mem_right SetTheory.PGame.Domineering.card_of_mem_right
theorem moveLeft_card {b : Board} {m : β€ Γ β€} (h : m β left b) :
Finset.card (moveLeft b m) + 2 = Finset.card b := by
dsimp [moveLeft]
rw [Finset.card_erase_of_mem (snd_pred_mem_erase_of_mem_left h)]
rw [Finset.card_erase_of_mem (Finset.mem_of_mem_inter_left h)]
exact tsub_add_cancel_of_le (card_of_mem_left h)
#align pgame.domineering.move_left_card SetTheory.PGame.Domineering.moveLeft_card
| Mathlib/SetTheory/Game/Domineering.lean | 117 | 122 | theorem moveRight_card {b : Board} {m : β€ Γ β€} (h : m β right b) :
Finset.card (moveRight b m) + 2 = Finset.card b := by |
dsimp [moveRight]
rw [Finset.card_erase_of_mem (fst_pred_mem_erase_of_mem_right h)]
rw [Finset.card_erase_of_mem (Finset.mem_of_mem_inter_left h)]
exact tsub_add_cancel_of_le (card_of_mem_right h)
| 4 | 54.59815 | 2 | 1.428571 | 7 | 1,521 |
import Mathlib.SetTheory.Game.State
#align_import set_theory.game.domineering from "leanprover-community/mathlib"@"b134b2f5cf6dd25d4bbfd3c498b6e36c11a17225"
namespace SetTheory
namespace PGame
namespace Domineering
open Function
@[simps!]
def shiftUp : β€ Γ β€ β β€ Γ β€ :=
(Equiv.refl β€).prodCongr (Equiv.addRight (1 : β€))
#align pgame.domineering.shift_up SetTheory.PGame.Domineering.shiftUp
@[simps!]
def shiftRight : β€ Γ β€ β β€ Γ β€ :=
(Equiv.addRight (1 : β€)).prodCongr (Equiv.refl β€)
#align pgame.domineering.shift_right SetTheory.PGame.Domineering.shiftRight
-- Porting note: reducibility cannot be `local`. For now there are no dependents of this file so
-- being globally reducible is fine.
abbrev Board :=
Finset (β€ Γ β€)
#align pgame.domineering.board SetTheory.PGame.Domineering.Board
def left (b : Board) : Finset (β€ Γ β€) :=
b β© b.map shiftUp
#align pgame.domineering.left SetTheory.PGame.Domineering.left
def right (b : Board) : Finset (β€ Γ β€) :=
b β© b.map shiftRight
#align pgame.domineering.right SetTheory.PGame.Domineering.right
theorem mem_left {b : Board} (x : β€ Γ β€) : x β left b β x β b β§ (x.1, x.2 - 1) β b :=
Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv)
#align pgame.domineering.mem_left SetTheory.PGame.Domineering.mem_left
theorem mem_right {b : Board} (x : β€ Γ β€) : x β right b β x β b β§ (x.1 - 1, x.2) β b :=
Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv)
#align pgame.domineering.mem_right SetTheory.PGame.Domineering.mem_right
def moveLeft (b : Board) (m : β€ Γ β€) : Board :=
(b.erase m).erase (m.1, m.2 - 1)
#align pgame.domineering.move_left SetTheory.PGame.Domineering.moveLeft
def moveRight (b : Board) (m : β€ Γ β€) : Board :=
(b.erase m).erase (m.1 - 1, m.2)
#align pgame.domineering.move_right SetTheory.PGame.Domineering.moveRight
theorem fst_pred_mem_erase_of_mem_right {b : Board} {m : β€ Γ β€} (h : m β right b) :
(m.1 - 1, m.2) β b.erase m := by
rw [mem_right] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.fst (pred_ne_self m.1)
#align pgame.domineering.fst_pred_mem_erase_of_mem_right SetTheory.PGame.Domineering.fst_pred_mem_erase_of_mem_right
theorem snd_pred_mem_erase_of_mem_left {b : Board} {m : β€ Γ β€} (h : m β left b) :
(m.1, m.2 - 1) β b.erase m := by
rw [mem_left] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.snd (pred_ne_self m.2)
#align pgame.domineering.snd_pred_mem_erase_of_mem_left SetTheory.PGame.Domineering.snd_pred_mem_erase_of_mem_left
theorem card_of_mem_left {b : Board} {m : β€ Γ β€} (h : m β left b) : 2 β€ Finset.card b := by
have wβ : m β b := (Finset.mem_inter.1 h).1
have wβ : (m.1, m.2 - 1) β b.erase m := snd_pred_mem_erase_of_mem_left h
have iβ := Finset.card_erase_lt_of_mem wβ
have iβ := Nat.lt_of_le_of_lt (Nat.zero_le _) (Finset.card_erase_lt_of_mem wβ)
exact Nat.lt_of_le_of_lt iβ iβ
#align pgame.domineering.card_of_mem_left SetTheory.PGame.Domineering.card_of_mem_left
theorem card_of_mem_right {b : Board} {m : β€ Γ β€} (h : m β right b) : 2 β€ Finset.card b := by
have wβ : m β b := (Finset.mem_inter.1 h).1
have wβ := fst_pred_mem_erase_of_mem_right h
have iβ := Finset.card_erase_lt_of_mem wβ
have iβ := Nat.lt_of_le_of_lt (Nat.zero_le _) (Finset.card_erase_lt_of_mem wβ)
exact Nat.lt_of_le_of_lt iβ iβ
#align pgame.domineering.card_of_mem_right SetTheory.PGame.Domineering.card_of_mem_right
theorem moveLeft_card {b : Board} {m : β€ Γ β€} (h : m β left b) :
Finset.card (moveLeft b m) + 2 = Finset.card b := by
dsimp [moveLeft]
rw [Finset.card_erase_of_mem (snd_pred_mem_erase_of_mem_left h)]
rw [Finset.card_erase_of_mem (Finset.mem_of_mem_inter_left h)]
exact tsub_add_cancel_of_le (card_of_mem_left h)
#align pgame.domineering.move_left_card SetTheory.PGame.Domineering.moveLeft_card
theorem moveRight_card {b : Board} {m : β€ Γ β€} (h : m β right b) :
Finset.card (moveRight b m) + 2 = Finset.card b := by
dsimp [moveRight]
rw [Finset.card_erase_of_mem (fst_pred_mem_erase_of_mem_right h)]
rw [Finset.card_erase_of_mem (Finset.mem_of_mem_inter_left h)]
exact tsub_add_cancel_of_le (card_of_mem_right h)
#align pgame.domineering.move_right_card SetTheory.PGame.Domineering.moveRight_card
| Mathlib/SetTheory/Game/Domineering.lean | 125 | 126 | theorem moveLeft_smaller {b : Board} {m : β€ Γ β€} (h : m β left b) :
Finset.card (moveLeft b m) / 2 < Finset.card b / 2 := by | simp [β moveLeft_card h, lt_add_one]
| 1 | 2.718282 | 0 | 1.428571 | 7 | 1,521 |
import Mathlib.Algebra.Order.Group.TypeTags
import Mathlib.FieldTheory.RatFunc.Degree
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.Topology.Algebra.ValuedField
#align_import number_theory.function_field from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open scoped nonZeroDivisors Polynomial DiscreteValuation
variable (Fq F : Type) [Field Fq] [Field F]
abbrev FunctionField [Algebra (RatFunc Fq) F] : Prop :=
FiniteDimensional (RatFunc Fq) F
#align function_field FunctionField
-- Porting note: Removed `protected`
| Mathlib/NumberTheory/FunctionField.lean | 62 | 80 | theorem functionField_iff (Fqt : Type*) [Field Fqt] [Algebra Fq[X] Fqt]
[IsFractionRing Fq[X] Fqt] [Algebra (RatFunc Fq) F] [Algebra Fqt F] [Algebra Fq[X] F]
[IsScalarTower Fq[X] Fqt F] [IsScalarTower Fq[X] (RatFunc Fq) F] :
FunctionField Fq F β FiniteDimensional Fqt F := by |
let e := IsLocalization.algEquiv Fq[X]β° (RatFunc Fq) Fqt
have : β (c) (x : F), e c β’ x = c β’ x := by
intro c x
rw [Algebra.smul_def, Algebra.smul_def]
congr
refine congr_fun (f := fun c => algebraMap Fqt F (e c)) ?_ c -- Porting note: Added `(f := _)`
refine IsLocalization.ext (nonZeroDivisors Fq[X]) _ _ ?_ ?_ ?_ ?_ ?_ <;> intros <;>
simp only [AlgEquiv.map_one, RingHom.map_one, AlgEquiv.map_mul, RingHom.map_mul,
AlgEquiv.commutes, β IsScalarTower.algebraMap_apply]
constructor <;> intro h
Β· let b := FiniteDimensional.finBasis (RatFunc Fq) F
exact FiniteDimensional.of_fintype_basis (b.mapCoeffs e this)
Β· let b := FiniteDimensional.finBasis Fqt F
refine FiniteDimensional.of_fintype_basis (b.mapCoeffs e.symm ?_)
intro c x; convert (this (e.symm c) x).symm; simp only [e.apply_symm_apply]
| 15 | 3,269,017.372472 | 2 | 1.428571 | 7 | 1,522 |
import Mathlib.Algebra.Order.Group.TypeTags
import Mathlib.FieldTheory.RatFunc.Degree
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.Topology.Algebra.ValuedField
#align_import number_theory.function_field from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open scoped nonZeroDivisors Polynomial DiscreteValuation
variable (Fq F : Type) [Field Fq] [Field F]
abbrev FunctionField [Algebra (RatFunc Fq) F] : Prop :=
FiniteDimensional (RatFunc Fq) F
#align function_field FunctionField
-- Porting note: Removed `protected`
theorem functionField_iff (Fqt : Type*) [Field Fqt] [Algebra Fq[X] Fqt]
[IsFractionRing Fq[X] Fqt] [Algebra (RatFunc Fq) F] [Algebra Fqt F] [Algebra Fq[X] F]
[IsScalarTower Fq[X] Fqt F] [IsScalarTower Fq[X] (RatFunc Fq) F] :
FunctionField Fq F β FiniteDimensional Fqt F := by
let e := IsLocalization.algEquiv Fq[X]β° (RatFunc Fq) Fqt
have : β (c) (x : F), e c β’ x = c β’ x := by
intro c x
rw [Algebra.smul_def, Algebra.smul_def]
congr
refine congr_fun (f := fun c => algebraMap Fqt F (e c)) ?_ c -- Porting note: Added `(f := _)`
refine IsLocalization.ext (nonZeroDivisors Fq[X]) _ _ ?_ ?_ ?_ ?_ ?_ <;> intros <;>
simp only [AlgEquiv.map_one, RingHom.map_one, AlgEquiv.map_mul, RingHom.map_mul,
AlgEquiv.commutes, β IsScalarTower.algebraMap_apply]
constructor <;> intro h
Β· let b := FiniteDimensional.finBasis (RatFunc Fq) F
exact FiniteDimensional.of_fintype_basis (b.mapCoeffs e this)
Β· let b := FiniteDimensional.finBasis Fqt F
refine FiniteDimensional.of_fintype_basis (b.mapCoeffs e.symm ?_)
intro c x; convert (this (e.symm c) x).symm; simp only [e.apply_symm_apply]
#align function_field_iff functionField_iff
| Mathlib/NumberTheory/FunctionField.lean | 83 | 86 | theorem algebraMap_injective [Algebra Fq[X] F] [Algebra (RatFunc Fq) F]
[IsScalarTower Fq[X] (RatFunc Fq) F] : Function.Injective (β(algebraMap Fq[X] F)) := by |
rw [IsScalarTower.algebraMap_eq Fq[X] (RatFunc Fq) F]
exact (algebraMap (RatFunc Fq) F).injective.comp (IsFractionRing.injective Fq[X] (RatFunc Fq))
| 2 | 7.389056 | 1 | 1.428571 | 7 | 1,522 |
import Mathlib.Algebra.Order.Group.TypeTags
import Mathlib.FieldTheory.RatFunc.Degree
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.Topology.Algebra.ValuedField
#align_import number_theory.function_field from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open scoped nonZeroDivisors Polynomial DiscreteValuation
variable (Fq F : Type) [Field Fq] [Field F]
abbrev FunctionField [Algebra (RatFunc Fq) F] : Prop :=
FiniteDimensional (RatFunc Fq) F
#align function_field FunctionField
-- Porting note: Removed `protected`
theorem functionField_iff (Fqt : Type*) [Field Fqt] [Algebra Fq[X] Fqt]
[IsFractionRing Fq[X] Fqt] [Algebra (RatFunc Fq) F] [Algebra Fqt F] [Algebra Fq[X] F]
[IsScalarTower Fq[X] Fqt F] [IsScalarTower Fq[X] (RatFunc Fq) F] :
FunctionField Fq F β FiniteDimensional Fqt F := by
let e := IsLocalization.algEquiv Fq[X]β° (RatFunc Fq) Fqt
have : β (c) (x : F), e c β’ x = c β’ x := by
intro c x
rw [Algebra.smul_def, Algebra.smul_def]
congr
refine congr_fun (f := fun c => algebraMap Fqt F (e c)) ?_ c -- Porting note: Added `(f := _)`
refine IsLocalization.ext (nonZeroDivisors Fq[X]) _ _ ?_ ?_ ?_ ?_ ?_ <;> intros <;>
simp only [AlgEquiv.map_one, RingHom.map_one, AlgEquiv.map_mul, RingHom.map_mul,
AlgEquiv.commutes, β IsScalarTower.algebraMap_apply]
constructor <;> intro h
Β· let b := FiniteDimensional.finBasis (RatFunc Fq) F
exact FiniteDimensional.of_fintype_basis (b.mapCoeffs e this)
Β· let b := FiniteDimensional.finBasis Fqt F
refine FiniteDimensional.of_fintype_basis (b.mapCoeffs e.symm ?_)
intro c x; convert (this (e.symm c) x).symm; simp only [e.apply_symm_apply]
#align function_field_iff functionField_iff
theorem algebraMap_injective [Algebra Fq[X] F] [Algebra (RatFunc Fq) F]
[IsScalarTower Fq[X] (RatFunc Fq) F] : Function.Injective (β(algebraMap Fq[X] F)) := by
rw [IsScalarTower.algebraMap_eq Fq[X] (RatFunc Fq) F]
exact (algebraMap (RatFunc Fq) F).injective.comp (IsFractionRing.injective Fq[X] (RatFunc Fq))
#align algebra_map_injective algebraMap_injective
namespace FunctionField
def ringOfIntegers [Algebra Fq[X] F] :=
integralClosure Fq[X] F
#align function_field.ring_of_integers FunctionField.ringOfIntegers
namespace ringOfIntegers
variable [Algebra Fq[X] F]
instance : IsDomain (ringOfIntegers Fq F) :=
(ringOfIntegers Fq F).isDomain
instance : IsIntegralClosure (ringOfIntegers Fq F) Fq[X] F :=
integralClosure.isIntegralClosure _ _
variable [Algebra (RatFunc Fq) F] [IsScalarTower Fq[X] (RatFunc Fq) F]
| Mathlib/NumberTheory/FunctionField.lean | 113 | 121 | theorem algebraMap_injective : Function.Injective (β(algebraMap Fq[X] (ringOfIntegers Fq F))) := by |
have hinj : Function.Injective (β(algebraMap Fq[X] F)) := by
rw [IsScalarTower.algebraMap_eq Fq[X] (RatFunc Fq) F]
exact (algebraMap (RatFunc Fq) F).injective.comp (IsFractionRing.injective Fq[X] (RatFunc Fq))
rw [injective_iff_map_eq_zero (algebraMap Fq[X] (β₯(ringOfIntegers Fq F)))]
intro p hp
rw [β Subtype.coe_inj, Subalgebra.coe_zero] at hp
rw [injective_iff_map_eq_zero (algebraMap Fq[X] F)] at hinj
exact hinj p hp
| 8 | 2,980.957987 | 2 | 1.428571 | 7 | 1,522 |
import Mathlib.Algebra.Order.Group.TypeTags
import Mathlib.FieldTheory.RatFunc.Degree
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.Topology.Algebra.ValuedField
#align_import number_theory.function_field from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open scoped nonZeroDivisors Polynomial DiscreteValuation
variable (Fq F : Type) [Field Fq] [Field F]
abbrev FunctionField [Algebra (RatFunc Fq) F] : Prop :=
FiniteDimensional (RatFunc Fq) F
#align function_field FunctionField
-- Porting note: Removed `protected`
theorem functionField_iff (Fqt : Type*) [Field Fqt] [Algebra Fq[X] Fqt]
[IsFractionRing Fq[X] Fqt] [Algebra (RatFunc Fq) F] [Algebra Fqt F] [Algebra Fq[X] F]
[IsScalarTower Fq[X] Fqt F] [IsScalarTower Fq[X] (RatFunc Fq) F] :
FunctionField Fq F β FiniteDimensional Fqt F := by
let e := IsLocalization.algEquiv Fq[X]β° (RatFunc Fq) Fqt
have : β (c) (x : F), e c β’ x = c β’ x := by
intro c x
rw [Algebra.smul_def, Algebra.smul_def]
congr
refine congr_fun (f := fun c => algebraMap Fqt F (e c)) ?_ c -- Porting note: Added `(f := _)`
refine IsLocalization.ext (nonZeroDivisors Fq[X]) _ _ ?_ ?_ ?_ ?_ ?_ <;> intros <;>
simp only [AlgEquiv.map_one, RingHom.map_one, AlgEquiv.map_mul, RingHom.map_mul,
AlgEquiv.commutes, β IsScalarTower.algebraMap_apply]
constructor <;> intro h
Β· let b := FiniteDimensional.finBasis (RatFunc Fq) F
exact FiniteDimensional.of_fintype_basis (b.mapCoeffs e this)
Β· let b := FiniteDimensional.finBasis Fqt F
refine FiniteDimensional.of_fintype_basis (b.mapCoeffs e.symm ?_)
intro c x; convert (this (e.symm c) x).symm; simp only [e.apply_symm_apply]
#align function_field_iff functionField_iff
theorem algebraMap_injective [Algebra Fq[X] F] [Algebra (RatFunc Fq) F]
[IsScalarTower Fq[X] (RatFunc Fq) F] : Function.Injective (β(algebraMap Fq[X] F)) := by
rw [IsScalarTower.algebraMap_eq Fq[X] (RatFunc Fq) F]
exact (algebraMap (RatFunc Fq) F).injective.comp (IsFractionRing.injective Fq[X] (RatFunc Fq))
#align algebra_map_injective algebraMap_injective
namespace FunctionField
def ringOfIntegers [Algebra Fq[X] F] :=
integralClosure Fq[X] F
#align function_field.ring_of_integers FunctionField.ringOfIntegers
namespace ringOfIntegers
variable [Algebra Fq[X] F]
instance : IsDomain (ringOfIntegers Fq F) :=
(ringOfIntegers Fq F).isDomain
instance : IsIntegralClosure (ringOfIntegers Fq F) Fq[X] F :=
integralClosure.isIntegralClosure _ _
variable [Algebra (RatFunc Fq) F] [IsScalarTower Fq[X] (RatFunc Fq) F]
theorem algebraMap_injective : Function.Injective (β(algebraMap Fq[X] (ringOfIntegers Fq F))) := by
have hinj : Function.Injective (β(algebraMap Fq[X] F)) := by
rw [IsScalarTower.algebraMap_eq Fq[X] (RatFunc Fq) F]
exact (algebraMap (RatFunc Fq) F).injective.comp (IsFractionRing.injective Fq[X] (RatFunc Fq))
rw [injective_iff_map_eq_zero (algebraMap Fq[X] (β₯(ringOfIntegers Fq F)))]
intro p hp
rw [β Subtype.coe_inj, Subalgebra.coe_zero] at hp
rw [injective_iff_map_eq_zero (algebraMap Fq[X] F)] at hinj
exact hinj p hp
#align function_field.ring_of_integers.algebra_map_injective FunctionField.ringOfIntegers.algebraMap_injective
| Mathlib/NumberTheory/FunctionField.lean | 124 | 127 | theorem not_isField : Β¬IsField (ringOfIntegers Fq F) := by |
simpa [β (IsIntegralClosure.isIntegral_algebra Fq[X] F).isField_iff_isField
(algebraMap_injective Fq F)] using
Polynomial.not_isField Fq
| 3 | 20.085537 | 1 | 1.428571 | 7 | 1,522 |
import Mathlib.Algebra.Order.Group.TypeTags
import Mathlib.FieldTheory.RatFunc.Degree
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.Topology.Algebra.ValuedField
#align_import number_theory.function_field from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open scoped nonZeroDivisors Polynomial DiscreteValuation
variable (Fq F : Type) [Field Fq] [Field F]
abbrev FunctionField [Algebra (RatFunc Fq) F] : Prop :=
FiniteDimensional (RatFunc Fq) F
#align function_field FunctionField
-- Porting note: Removed `protected`
theorem functionField_iff (Fqt : Type*) [Field Fqt] [Algebra Fq[X] Fqt]
[IsFractionRing Fq[X] Fqt] [Algebra (RatFunc Fq) F] [Algebra Fqt F] [Algebra Fq[X] F]
[IsScalarTower Fq[X] Fqt F] [IsScalarTower Fq[X] (RatFunc Fq) F] :
FunctionField Fq F β FiniteDimensional Fqt F := by
let e := IsLocalization.algEquiv Fq[X]β° (RatFunc Fq) Fqt
have : β (c) (x : F), e c β’ x = c β’ x := by
intro c x
rw [Algebra.smul_def, Algebra.smul_def]
congr
refine congr_fun (f := fun c => algebraMap Fqt F (e c)) ?_ c -- Porting note: Added `(f := _)`
refine IsLocalization.ext (nonZeroDivisors Fq[X]) _ _ ?_ ?_ ?_ ?_ ?_ <;> intros <;>
simp only [AlgEquiv.map_one, RingHom.map_one, AlgEquiv.map_mul, RingHom.map_mul,
AlgEquiv.commutes, β IsScalarTower.algebraMap_apply]
constructor <;> intro h
Β· let b := FiniteDimensional.finBasis (RatFunc Fq) F
exact FiniteDimensional.of_fintype_basis (b.mapCoeffs e this)
Β· let b := FiniteDimensional.finBasis Fqt F
refine FiniteDimensional.of_fintype_basis (b.mapCoeffs e.symm ?_)
intro c x; convert (this (e.symm c) x).symm; simp only [e.apply_symm_apply]
#align function_field_iff functionField_iff
theorem algebraMap_injective [Algebra Fq[X] F] [Algebra (RatFunc Fq) F]
[IsScalarTower Fq[X] (RatFunc Fq) F] : Function.Injective (β(algebraMap Fq[X] F)) := by
rw [IsScalarTower.algebraMap_eq Fq[X] (RatFunc Fq) F]
exact (algebraMap (RatFunc Fq) F).injective.comp (IsFractionRing.injective Fq[X] (RatFunc Fq))
#align algebra_map_injective algebraMap_injective
namespace FunctionField
def ringOfIntegers [Algebra Fq[X] F] :=
integralClosure Fq[X] F
#align function_field.ring_of_integers FunctionField.ringOfIntegers
section InftyValuation
variable [DecidableEq (RatFunc Fq)]
def inftyValuationDef (r : RatFunc Fq) : β€ββ :=
if r = 0 then 0 else β(Multiplicative.ofAdd r.intDegree)
#align function_field.infty_valuation_def FunctionField.inftyValuationDef
theorem InftyValuation.map_zero' : inftyValuationDef Fq 0 = 0 :=
if_pos rfl
#align function_field.infty_valuation.map_zero' FunctionField.InftyValuation.map_zero'
theorem InftyValuation.map_one' : inftyValuationDef Fq 1 = 1 :=
(if_neg one_ne_zero).trans <| by rw [RatFunc.intDegree_one, ofAdd_zero, WithZero.coe_one]
#align function_field.infty_valuation.map_one' FunctionField.InftyValuation.map_one'
| Mathlib/NumberTheory/FunctionField.lean | 168 | 176 | theorem InftyValuation.map_mul' (x y : RatFunc Fq) :
inftyValuationDef Fq (x * y) = inftyValuationDef Fq x * inftyValuationDef Fq y := by |
rw [inftyValuationDef, inftyValuationDef, inftyValuationDef]
by_cases hx : x = 0
Β· rw [hx, zero_mul, if_pos (Eq.refl _), zero_mul]
Β· by_cases hy : y = 0
Β· rw [hy, mul_zero, if_pos (Eq.refl _), mul_zero]
Β· rw [if_neg hx, if_neg hy, if_neg (mul_ne_zero hx hy), β WithZero.coe_mul, WithZero.coe_inj,
β ofAdd_add, RatFunc.intDegree_mul hx hy]
| 7 | 1,096.633158 | 2 | 1.428571 | 7 | 1,522 |
import Mathlib.Algebra.Order.Group.TypeTags
import Mathlib.FieldTheory.RatFunc.Degree
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.Topology.Algebra.ValuedField
#align_import number_theory.function_field from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open scoped nonZeroDivisors Polynomial DiscreteValuation
variable (Fq F : Type) [Field Fq] [Field F]
abbrev FunctionField [Algebra (RatFunc Fq) F] : Prop :=
FiniteDimensional (RatFunc Fq) F
#align function_field FunctionField
-- Porting note: Removed `protected`
theorem functionField_iff (Fqt : Type*) [Field Fqt] [Algebra Fq[X] Fqt]
[IsFractionRing Fq[X] Fqt] [Algebra (RatFunc Fq) F] [Algebra Fqt F] [Algebra Fq[X] F]
[IsScalarTower Fq[X] Fqt F] [IsScalarTower Fq[X] (RatFunc Fq) F] :
FunctionField Fq F β FiniteDimensional Fqt F := by
let e := IsLocalization.algEquiv Fq[X]β° (RatFunc Fq) Fqt
have : β (c) (x : F), e c β’ x = c β’ x := by
intro c x
rw [Algebra.smul_def, Algebra.smul_def]
congr
refine congr_fun (f := fun c => algebraMap Fqt F (e c)) ?_ c -- Porting note: Added `(f := _)`
refine IsLocalization.ext (nonZeroDivisors Fq[X]) _ _ ?_ ?_ ?_ ?_ ?_ <;> intros <;>
simp only [AlgEquiv.map_one, RingHom.map_one, AlgEquiv.map_mul, RingHom.map_mul,
AlgEquiv.commutes, β IsScalarTower.algebraMap_apply]
constructor <;> intro h
Β· let b := FiniteDimensional.finBasis (RatFunc Fq) F
exact FiniteDimensional.of_fintype_basis (b.mapCoeffs e this)
Β· let b := FiniteDimensional.finBasis Fqt F
refine FiniteDimensional.of_fintype_basis (b.mapCoeffs e.symm ?_)
intro c x; convert (this (e.symm c) x).symm; simp only [e.apply_symm_apply]
#align function_field_iff functionField_iff
theorem algebraMap_injective [Algebra Fq[X] F] [Algebra (RatFunc Fq) F]
[IsScalarTower Fq[X] (RatFunc Fq) F] : Function.Injective (β(algebraMap Fq[X] F)) := by
rw [IsScalarTower.algebraMap_eq Fq[X] (RatFunc Fq) F]
exact (algebraMap (RatFunc Fq) F).injective.comp (IsFractionRing.injective Fq[X] (RatFunc Fq))
#align algebra_map_injective algebraMap_injective
namespace FunctionField
def ringOfIntegers [Algebra Fq[X] F] :=
integralClosure Fq[X] F
#align function_field.ring_of_integers FunctionField.ringOfIntegers
section InftyValuation
variable [DecidableEq (RatFunc Fq)]
def inftyValuationDef (r : RatFunc Fq) : β€ββ :=
if r = 0 then 0 else β(Multiplicative.ofAdd r.intDegree)
#align function_field.infty_valuation_def FunctionField.inftyValuationDef
theorem InftyValuation.map_zero' : inftyValuationDef Fq 0 = 0 :=
if_pos rfl
#align function_field.infty_valuation.map_zero' FunctionField.InftyValuation.map_zero'
theorem InftyValuation.map_one' : inftyValuationDef Fq 1 = 1 :=
(if_neg one_ne_zero).trans <| by rw [RatFunc.intDegree_one, ofAdd_zero, WithZero.coe_one]
#align function_field.infty_valuation.map_one' FunctionField.InftyValuation.map_one'
theorem InftyValuation.map_mul' (x y : RatFunc Fq) :
inftyValuationDef Fq (x * y) = inftyValuationDef Fq x * inftyValuationDef Fq y := by
rw [inftyValuationDef, inftyValuationDef, inftyValuationDef]
by_cases hx : x = 0
Β· rw [hx, zero_mul, if_pos (Eq.refl _), zero_mul]
Β· by_cases hy : y = 0
Β· rw [hy, mul_zero, if_pos (Eq.refl _), mul_zero]
Β· rw [if_neg hx, if_neg hy, if_neg (mul_ne_zero hx hy), β WithZero.coe_mul, WithZero.coe_inj,
β ofAdd_add, RatFunc.intDegree_mul hx hy]
#align function_field.infty_valuation.map_mul' FunctionField.InftyValuation.map_mul'
| Mathlib/NumberTheory/FunctionField.lean | 179 | 195 | theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
inftyValuationDef Fq (x + y) β€ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by |
by_cases hx : x = 0
Β· rw [hx, zero_add]
conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
Β· by_cases hy : y = 0
Β· rw [hy, add_zero]
conv_rhs => rw [max_comm, inftyValuationDef, if_pos (Eq.refl _)]
rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq x))]
Β· by_cases hxy : x + y = 0
Β· rw [inftyValuationDef, if_pos hxy]; exact zero_le'
Β· rw [inftyValuationDef, inftyValuationDef, inftyValuationDef, if_neg hx, if_neg hy,
if_neg hxy]
rw [le_max_iff, WithZero.coe_le_coe, Multiplicative.ofAdd_le, WithZero.coe_le_coe,
Multiplicative.ofAdd_le, β le_max_iff]
exact RatFunc.intDegree_add_le hy hxy
| 15 | 3,269,017.372472 | 2 | 1.428571 | 7 | 1,522 |
import Mathlib.Algebra.Order.Group.TypeTags
import Mathlib.FieldTheory.RatFunc.Degree
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.Topology.Algebra.ValuedField
#align_import number_theory.function_field from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open scoped nonZeroDivisors Polynomial DiscreteValuation
variable (Fq F : Type) [Field Fq] [Field F]
abbrev FunctionField [Algebra (RatFunc Fq) F] : Prop :=
FiniteDimensional (RatFunc Fq) F
#align function_field FunctionField
-- Porting note: Removed `protected`
theorem functionField_iff (Fqt : Type*) [Field Fqt] [Algebra Fq[X] Fqt]
[IsFractionRing Fq[X] Fqt] [Algebra (RatFunc Fq) F] [Algebra Fqt F] [Algebra Fq[X] F]
[IsScalarTower Fq[X] Fqt F] [IsScalarTower Fq[X] (RatFunc Fq) F] :
FunctionField Fq F β FiniteDimensional Fqt F := by
let e := IsLocalization.algEquiv Fq[X]β° (RatFunc Fq) Fqt
have : β (c) (x : F), e c β’ x = c β’ x := by
intro c x
rw [Algebra.smul_def, Algebra.smul_def]
congr
refine congr_fun (f := fun c => algebraMap Fqt F (e c)) ?_ c -- Porting note: Added `(f := _)`
refine IsLocalization.ext (nonZeroDivisors Fq[X]) _ _ ?_ ?_ ?_ ?_ ?_ <;> intros <;>
simp only [AlgEquiv.map_one, RingHom.map_one, AlgEquiv.map_mul, RingHom.map_mul,
AlgEquiv.commutes, β IsScalarTower.algebraMap_apply]
constructor <;> intro h
Β· let b := FiniteDimensional.finBasis (RatFunc Fq) F
exact FiniteDimensional.of_fintype_basis (b.mapCoeffs e this)
Β· let b := FiniteDimensional.finBasis Fqt F
refine FiniteDimensional.of_fintype_basis (b.mapCoeffs e.symm ?_)
intro c x; convert (this (e.symm c) x).symm; simp only [e.apply_symm_apply]
#align function_field_iff functionField_iff
theorem algebraMap_injective [Algebra Fq[X] F] [Algebra (RatFunc Fq) F]
[IsScalarTower Fq[X] (RatFunc Fq) F] : Function.Injective (β(algebraMap Fq[X] F)) := by
rw [IsScalarTower.algebraMap_eq Fq[X] (RatFunc Fq) F]
exact (algebraMap (RatFunc Fq) F).injective.comp (IsFractionRing.injective Fq[X] (RatFunc Fq))
#align algebra_map_injective algebraMap_injective
namespace FunctionField
def ringOfIntegers [Algebra Fq[X] F] :=
integralClosure Fq[X] F
#align function_field.ring_of_integers FunctionField.ringOfIntegers
section InftyValuation
variable [DecidableEq (RatFunc Fq)]
def inftyValuationDef (r : RatFunc Fq) : β€ββ :=
if r = 0 then 0 else β(Multiplicative.ofAdd r.intDegree)
#align function_field.infty_valuation_def FunctionField.inftyValuationDef
theorem InftyValuation.map_zero' : inftyValuationDef Fq 0 = 0 :=
if_pos rfl
#align function_field.infty_valuation.map_zero' FunctionField.InftyValuation.map_zero'
theorem InftyValuation.map_one' : inftyValuationDef Fq 1 = 1 :=
(if_neg one_ne_zero).trans <| by rw [RatFunc.intDegree_one, ofAdd_zero, WithZero.coe_one]
#align function_field.infty_valuation.map_one' FunctionField.InftyValuation.map_one'
theorem InftyValuation.map_mul' (x y : RatFunc Fq) :
inftyValuationDef Fq (x * y) = inftyValuationDef Fq x * inftyValuationDef Fq y := by
rw [inftyValuationDef, inftyValuationDef, inftyValuationDef]
by_cases hx : x = 0
Β· rw [hx, zero_mul, if_pos (Eq.refl _), zero_mul]
Β· by_cases hy : y = 0
Β· rw [hy, mul_zero, if_pos (Eq.refl _), mul_zero]
Β· rw [if_neg hx, if_neg hy, if_neg (mul_ne_zero hx hy), β WithZero.coe_mul, WithZero.coe_inj,
β ofAdd_add, RatFunc.intDegree_mul hx hy]
#align function_field.infty_valuation.map_mul' FunctionField.InftyValuation.map_mul'
theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
inftyValuationDef Fq (x + y) β€ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by
by_cases hx : x = 0
Β· rw [hx, zero_add]
conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
Β· by_cases hy : y = 0
Β· rw [hy, add_zero]
conv_rhs => rw [max_comm, inftyValuationDef, if_pos (Eq.refl _)]
rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq x))]
Β· by_cases hxy : x + y = 0
Β· rw [inftyValuationDef, if_pos hxy]; exact zero_le'
Β· rw [inftyValuationDef, inftyValuationDef, inftyValuationDef, if_neg hx, if_neg hy,
if_neg hxy]
rw [le_max_iff, WithZero.coe_le_coe, Multiplicative.ofAdd_le, WithZero.coe_le_coe,
Multiplicative.ofAdd_le, β le_max_iff]
exact RatFunc.intDegree_add_le hy hxy
#align function_field.infty_valuation.map_add_le_max' FunctionField.InftyValuation.map_add_le_max'
@[simp]
| Mathlib/NumberTheory/FunctionField.lean | 199 | 201 | theorem inftyValuation_of_nonzero {x : RatFunc Fq} (hx : x β 0) :
inftyValuationDef Fq x = Multiplicative.ofAdd x.intDegree := by |
rw [inftyValuationDef, if_neg hx]
| 1 | 2.718282 | 0 | 1.428571 | 7 | 1,522 |
import Mathlib.Topology.GDelta
#align_import topology.metric_space.baire from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
noncomputable section
open scoped Topology
open Filter Set TopologicalSpace
variable {X Ξ± : Type*} {ΞΉ : Sort*}
section BaireTheorem
variable [TopologicalSpace X] [BaireSpace X]
theorem dense_iInter_of_isOpen_nat {f : β β Set X} (ho : β n, IsOpen (f n))
(hd : β n, Dense (f n)) : Dense (β n, f n) :=
BaireSpace.baire_property f ho hd
#align dense_Inter_of_open_nat dense_iInter_of_isOpen_nat
| Mathlib/Topology/Baire/Lemmas.lean | 50 | 55 | theorem dense_sInter_of_isOpen {S : Set (Set X)} (ho : β s β S, IsOpen s) (hS : S.Countable)
(hd : β s β S, Dense s) : Dense (ββ S) := by |
rcases S.eq_empty_or_nonempty with h | h
Β· simp [h]
Β· rcases hS.exists_eq_range h with β¨f, rflβ©
exact dense_iInter_of_isOpen_nat (forall_mem_range.1 ho) (forall_mem_range.1 hd)
| 4 | 54.59815 | 2 | 1.428571 | 7 | 1,523 |
import Mathlib.Topology.GDelta
#align_import topology.metric_space.baire from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
noncomputable section
open scoped Topology
open Filter Set TopologicalSpace
variable {X Ξ± : Type*} {ΞΉ : Sort*}
section BaireTheorem
variable [TopologicalSpace X] [BaireSpace X]
theorem dense_iInter_of_isOpen_nat {f : β β Set X} (ho : β n, IsOpen (f n))
(hd : β n, Dense (f n)) : Dense (β n, f n) :=
BaireSpace.baire_property f ho hd
#align dense_Inter_of_open_nat dense_iInter_of_isOpen_nat
theorem dense_sInter_of_isOpen {S : Set (Set X)} (ho : β s β S, IsOpen s) (hS : S.Countable)
(hd : β s β S, Dense s) : Dense (ββ S) := by
rcases S.eq_empty_or_nonempty with h | h
Β· simp [h]
Β· rcases hS.exists_eq_range h with β¨f, rflβ©
exact dense_iInter_of_isOpen_nat (forall_mem_range.1 ho) (forall_mem_range.1 hd)
#align dense_sInter_of_open dense_sInter_of_isOpen
| Mathlib/Topology/Baire/Lemmas.lean | 60 | 63 | theorem dense_biInter_of_isOpen {S : Set Ξ±} {f : Ξ± β Set X} (ho : β s β S, IsOpen (f s))
(hS : S.Countable) (hd : β s β S, Dense (f s)) : Dense (β s β S, f s) := by |
rw [β sInter_image]
refine dense_sInter_of_isOpen ?_ (hS.image _) ?_ <;> rwa [forall_mem_image]
| 2 | 7.389056 | 1 | 1.428571 | 7 | 1,523 |
import Mathlib.Topology.GDelta
#align_import topology.metric_space.baire from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
noncomputable section
open scoped Topology
open Filter Set TopologicalSpace
variable {X Ξ± : Type*} {ΞΉ : Sort*}
section BaireTheorem
variable [TopologicalSpace X] [BaireSpace X]
theorem dense_iInter_of_isOpen_nat {f : β β Set X} (ho : β n, IsOpen (f n))
(hd : β n, Dense (f n)) : Dense (β n, f n) :=
BaireSpace.baire_property f ho hd
#align dense_Inter_of_open_nat dense_iInter_of_isOpen_nat
theorem dense_sInter_of_isOpen {S : Set (Set X)} (ho : β s β S, IsOpen s) (hS : S.Countable)
(hd : β s β S, Dense s) : Dense (ββ S) := by
rcases S.eq_empty_or_nonempty with h | h
Β· simp [h]
Β· rcases hS.exists_eq_range h with β¨f, rflβ©
exact dense_iInter_of_isOpen_nat (forall_mem_range.1 ho) (forall_mem_range.1 hd)
#align dense_sInter_of_open dense_sInter_of_isOpen
theorem dense_biInter_of_isOpen {S : Set Ξ±} {f : Ξ± β Set X} (ho : β s β S, IsOpen (f s))
(hS : S.Countable) (hd : β s β S, Dense (f s)) : Dense (β s β S, f s) := by
rw [β sInter_image]
refine dense_sInter_of_isOpen ?_ (hS.image _) ?_ <;> rwa [forall_mem_image]
#align dense_bInter_of_open dense_biInter_of_isOpen
theorem dense_iInter_of_isOpen [Countable ΞΉ] {f : ΞΉ β Set X} (ho : β i, IsOpen (f i))
(hd : β i, Dense (f i)) : Dense (β s, f s) :=
dense_sInter_of_isOpen (forall_mem_range.2 ho) (countable_range _) (forall_mem_range.2 hd)
#align dense_Inter_of_open dense_iInter_of_isOpen
| Mathlib/Topology/Baire/Lemmas.lean | 74 | 81 | theorem mem_residual {s : Set X} : s β residual X β β t β s, IsGΞ΄ t β§ Dense t := by |
constructor
Β· rw [mem_residual_iff]
rintro β¨S, hSo, hSd, Sct, Ssβ©
refine β¨_, Ss, β¨_, fun t ht => hSo _ ht, Sct, rflβ©, ?_β©
exact dense_sInter_of_isOpen hSo Sct hSd
rintro β¨t, ts, ho, hdβ©
exact mem_of_superset (residual_of_dense_GΞ΄ ho hd) ts
| 7 | 1,096.633158 | 2 | 1.428571 | 7 | 1,523 |
import Mathlib.Topology.GDelta
#align_import topology.metric_space.baire from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
noncomputable section
open scoped Topology
open Filter Set TopologicalSpace
variable {X Ξ± : Type*} {ΞΉ : Sort*}
section BaireTheorem
variable [TopologicalSpace X] [BaireSpace X]
theorem dense_iInter_of_isOpen_nat {f : β β Set X} (ho : β n, IsOpen (f n))
(hd : β n, Dense (f n)) : Dense (β n, f n) :=
BaireSpace.baire_property f ho hd
#align dense_Inter_of_open_nat dense_iInter_of_isOpen_nat
theorem dense_sInter_of_isOpen {S : Set (Set X)} (ho : β s β S, IsOpen s) (hS : S.Countable)
(hd : β s β S, Dense s) : Dense (ββ S) := by
rcases S.eq_empty_or_nonempty with h | h
Β· simp [h]
Β· rcases hS.exists_eq_range h with β¨f, rflβ©
exact dense_iInter_of_isOpen_nat (forall_mem_range.1 ho) (forall_mem_range.1 hd)
#align dense_sInter_of_open dense_sInter_of_isOpen
theorem dense_biInter_of_isOpen {S : Set Ξ±} {f : Ξ± β Set X} (ho : β s β S, IsOpen (f s))
(hS : S.Countable) (hd : β s β S, Dense (f s)) : Dense (β s β S, f s) := by
rw [β sInter_image]
refine dense_sInter_of_isOpen ?_ (hS.image _) ?_ <;> rwa [forall_mem_image]
#align dense_bInter_of_open dense_biInter_of_isOpen
theorem dense_iInter_of_isOpen [Countable ΞΉ] {f : ΞΉ β Set X} (ho : β i, IsOpen (f i))
(hd : β i, Dense (f i)) : Dense (β s, f s) :=
dense_sInter_of_isOpen (forall_mem_range.2 ho) (countable_range _) (forall_mem_range.2 hd)
#align dense_Inter_of_open dense_iInter_of_isOpen
theorem mem_residual {s : Set X} : s β residual X β β t β s, IsGΞ΄ t β§ Dense t := by
constructor
Β· rw [mem_residual_iff]
rintro β¨S, hSo, hSd, Sct, Ssβ©
refine β¨_, Ss, β¨_, fun t ht => hSo _ ht, Sct, rflβ©, ?_β©
exact dense_sInter_of_isOpen hSo Sct hSd
rintro β¨t, ts, ho, hdβ©
exact mem_of_superset (residual_of_dense_GΞ΄ ho hd) ts
#align mem_residual mem_residual
| Mathlib/Topology/Baire/Lemmas.lean | 85 | 88 | theorem eventually_residual {p : X β Prop} :
(βαΆ x in residual X, p x) β β t : Set X, IsGΞ΄ t β§ Dense t β§ β x β t, p x := by |
simp only [Filter.Eventually, mem_residual, subset_def, mem_setOf_eq]
tauto
| 2 | 7.389056 | 1 | 1.428571 | 7 | 1,523 |
import Mathlib.Topology.GDelta
#align_import topology.metric_space.baire from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
noncomputable section
open scoped Topology
open Filter Set TopologicalSpace
variable {X Ξ± : Type*} {ΞΉ : Sort*}
section BaireTheorem
variable [TopologicalSpace X] [BaireSpace X]
theorem dense_iInter_of_isOpen_nat {f : β β Set X} (ho : β n, IsOpen (f n))
(hd : β n, Dense (f n)) : Dense (β n, f n) :=
BaireSpace.baire_property f ho hd
#align dense_Inter_of_open_nat dense_iInter_of_isOpen_nat
theorem dense_sInter_of_isOpen {S : Set (Set X)} (ho : β s β S, IsOpen s) (hS : S.Countable)
(hd : β s β S, Dense s) : Dense (ββ S) := by
rcases S.eq_empty_or_nonempty with h | h
Β· simp [h]
Β· rcases hS.exists_eq_range h with β¨f, rflβ©
exact dense_iInter_of_isOpen_nat (forall_mem_range.1 ho) (forall_mem_range.1 hd)
#align dense_sInter_of_open dense_sInter_of_isOpen
theorem dense_biInter_of_isOpen {S : Set Ξ±} {f : Ξ± β Set X} (ho : β s β S, IsOpen (f s))
(hS : S.Countable) (hd : β s β S, Dense (f s)) : Dense (β s β S, f s) := by
rw [β sInter_image]
refine dense_sInter_of_isOpen ?_ (hS.image _) ?_ <;> rwa [forall_mem_image]
#align dense_bInter_of_open dense_biInter_of_isOpen
theorem dense_iInter_of_isOpen [Countable ΞΉ] {f : ΞΉ β Set X} (ho : β i, IsOpen (f i))
(hd : β i, Dense (f i)) : Dense (β s, f s) :=
dense_sInter_of_isOpen (forall_mem_range.2 ho) (countable_range _) (forall_mem_range.2 hd)
#align dense_Inter_of_open dense_iInter_of_isOpen
theorem mem_residual {s : Set X} : s β residual X β β t β s, IsGΞ΄ t β§ Dense t := by
constructor
Β· rw [mem_residual_iff]
rintro β¨S, hSo, hSd, Sct, Ssβ©
refine β¨_, Ss, β¨_, fun t ht => hSo _ ht, Sct, rflβ©, ?_β©
exact dense_sInter_of_isOpen hSo Sct hSd
rintro β¨t, ts, ho, hdβ©
exact mem_of_superset (residual_of_dense_GΞ΄ ho hd) ts
#align mem_residual mem_residual
theorem eventually_residual {p : X β Prop} :
(βαΆ x in residual X, p x) β β t : Set X, IsGΞ΄ t β§ Dense t β§ β x β t, p x := by
simp only [Filter.Eventually, mem_residual, subset_def, mem_setOf_eq]
tauto
#align eventually_residual eventually_residual
theorem dense_of_mem_residual {s : Set X} (hs : s β residual X) : Dense s :=
let β¨_, hts, _, hdβ© := mem_residual.1 hs
hd.mono hts
#align dense_of_mem_residual dense_of_mem_residual
theorem dense_sInter_of_GΞ΄ {S : Set (Set X)} (ho : β s β S, IsGΞ΄ s) (hS : S.Countable)
(hd : β s β S, Dense s) : Dense (ββ S) :=
dense_of_mem_residual ((countable_sInter_mem hS).mpr
(fun _ hs => residual_of_dense_GΞ΄ (ho _ hs) (hd _ hs)))
set_option linter.uppercaseLean3 false in
#align dense_sInter_of_GΞ΄ dense_sInter_of_GΞ΄
theorem dense_iInter_of_GΞ΄ [Countable ΞΉ] {f : ΞΉ β Set X} (ho : β s, IsGΞ΄ (f s))
(hd : β s, Dense (f s)) : Dense (β s, f s) :=
dense_sInter_of_GΞ΄ (forall_mem_range.2 βΉ_βΊ) (countable_range _) (forall_mem_range.2 βΉ_βΊ)
set_option linter.uppercaseLean3 false in
#align dense_Inter_of_GΞ΄ dense_iInter_of_GΞ΄
| Mathlib/Topology/Baire/Lemmas.lean | 114 | 118 | theorem dense_biInter_of_GΞ΄ {S : Set Ξ±} {f : β x β S, Set X} (ho : β s (H : s β S), IsGΞ΄ (f s H))
(hS : S.Countable) (hd : β s (H : s β S), Dense (f s H)) : Dense (β s β S, f s βΉ_βΊ) := by |
rw [biInter_eq_iInter]
haveI := hS.to_subtype
exact dense_iInter_of_GΞ΄ (fun s => ho s s.2) fun s => hd s s.2
| 3 | 20.085537 | 1 | 1.428571 | 7 | 1,523 |
import Mathlib.Topology.GDelta
#align_import topology.metric_space.baire from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
noncomputable section
open scoped Topology
open Filter Set TopologicalSpace
variable {X Ξ± : Type*} {ΞΉ : Sort*}
section BaireTheorem
variable [TopologicalSpace X] [BaireSpace X]
theorem dense_iInter_of_isOpen_nat {f : β β Set X} (ho : β n, IsOpen (f n))
(hd : β n, Dense (f n)) : Dense (β n, f n) :=
BaireSpace.baire_property f ho hd
#align dense_Inter_of_open_nat dense_iInter_of_isOpen_nat
theorem dense_sInter_of_isOpen {S : Set (Set X)} (ho : β s β S, IsOpen s) (hS : S.Countable)
(hd : β s β S, Dense s) : Dense (ββ S) := by
rcases S.eq_empty_or_nonempty with h | h
Β· simp [h]
Β· rcases hS.exists_eq_range h with β¨f, rflβ©
exact dense_iInter_of_isOpen_nat (forall_mem_range.1 ho) (forall_mem_range.1 hd)
#align dense_sInter_of_open dense_sInter_of_isOpen
theorem dense_biInter_of_isOpen {S : Set Ξ±} {f : Ξ± β Set X} (ho : β s β S, IsOpen (f s))
(hS : S.Countable) (hd : β s β S, Dense (f s)) : Dense (β s β S, f s) := by
rw [β sInter_image]
refine dense_sInter_of_isOpen ?_ (hS.image _) ?_ <;> rwa [forall_mem_image]
#align dense_bInter_of_open dense_biInter_of_isOpen
theorem dense_iInter_of_isOpen [Countable ΞΉ] {f : ΞΉ β Set X} (ho : β i, IsOpen (f i))
(hd : β i, Dense (f i)) : Dense (β s, f s) :=
dense_sInter_of_isOpen (forall_mem_range.2 ho) (countable_range _) (forall_mem_range.2 hd)
#align dense_Inter_of_open dense_iInter_of_isOpen
theorem mem_residual {s : Set X} : s β residual X β β t β s, IsGΞ΄ t β§ Dense t := by
constructor
Β· rw [mem_residual_iff]
rintro β¨S, hSo, hSd, Sct, Ssβ©
refine β¨_, Ss, β¨_, fun t ht => hSo _ ht, Sct, rflβ©, ?_β©
exact dense_sInter_of_isOpen hSo Sct hSd
rintro β¨t, ts, ho, hdβ©
exact mem_of_superset (residual_of_dense_GΞ΄ ho hd) ts
#align mem_residual mem_residual
theorem eventually_residual {p : X β Prop} :
(βαΆ x in residual X, p x) β β t : Set X, IsGΞ΄ t β§ Dense t β§ β x β t, p x := by
simp only [Filter.Eventually, mem_residual, subset_def, mem_setOf_eq]
tauto
#align eventually_residual eventually_residual
theorem dense_of_mem_residual {s : Set X} (hs : s β residual X) : Dense s :=
let β¨_, hts, _, hdβ© := mem_residual.1 hs
hd.mono hts
#align dense_of_mem_residual dense_of_mem_residual
theorem dense_sInter_of_GΞ΄ {S : Set (Set X)} (ho : β s β S, IsGΞ΄ s) (hS : S.Countable)
(hd : β s β S, Dense s) : Dense (ββ S) :=
dense_of_mem_residual ((countable_sInter_mem hS).mpr
(fun _ hs => residual_of_dense_GΞ΄ (ho _ hs) (hd _ hs)))
set_option linter.uppercaseLean3 false in
#align dense_sInter_of_GΞ΄ dense_sInter_of_GΞ΄
theorem dense_iInter_of_GΞ΄ [Countable ΞΉ] {f : ΞΉ β Set X} (ho : β s, IsGΞ΄ (f s))
(hd : β s, Dense (f s)) : Dense (β s, f s) :=
dense_sInter_of_GΞ΄ (forall_mem_range.2 βΉ_βΊ) (countable_range _) (forall_mem_range.2 βΉ_βΊ)
set_option linter.uppercaseLean3 false in
#align dense_Inter_of_GΞ΄ dense_iInter_of_GΞ΄
theorem dense_biInter_of_GΞ΄ {S : Set Ξ±} {f : β x β S, Set X} (ho : β s (H : s β S), IsGΞ΄ (f s H))
(hS : S.Countable) (hd : β s (H : s β S), Dense (f s H)) : Dense (β s β S, f s βΉ_βΊ) := by
rw [biInter_eq_iInter]
haveI := hS.to_subtype
exact dense_iInter_of_GΞ΄ (fun s => ho s s.2) fun s => hd s s.2
set_option linter.uppercaseLean3 false in
#align dense_bInter_of_GΞ΄ dense_biInter_of_GΞ΄
| Mathlib/Topology/Baire/Lemmas.lean | 123 | 126 | theorem Dense.inter_of_GΞ΄ {s t : Set X} (hs : IsGΞ΄ s) (ht : IsGΞ΄ t) (hsc : Dense s)
(htc : Dense t) : Dense (s β© t) := by |
rw [inter_eq_iInter]
apply dense_iInter_of_GΞ΄ <;> simp [Bool.forall_bool, *]
| 2 | 7.389056 | 1 | 1.428571 | 7 | 1,523 |
import Mathlib.Topology.GDelta
#align_import topology.metric_space.baire from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
noncomputable section
open scoped Topology
open Filter Set TopologicalSpace
variable {X Ξ± : Type*} {ΞΉ : Sort*}
section BaireTheorem
variable [TopologicalSpace X] [BaireSpace X]
theorem dense_iInter_of_isOpen_nat {f : β β Set X} (ho : β n, IsOpen (f n))
(hd : β n, Dense (f n)) : Dense (β n, f n) :=
BaireSpace.baire_property f ho hd
#align dense_Inter_of_open_nat dense_iInter_of_isOpen_nat
theorem dense_sInter_of_isOpen {S : Set (Set X)} (ho : β s β S, IsOpen s) (hS : S.Countable)
(hd : β s β S, Dense s) : Dense (ββ S) := by
rcases S.eq_empty_or_nonempty with h | h
Β· simp [h]
Β· rcases hS.exists_eq_range h with β¨f, rflβ©
exact dense_iInter_of_isOpen_nat (forall_mem_range.1 ho) (forall_mem_range.1 hd)
#align dense_sInter_of_open dense_sInter_of_isOpen
theorem dense_biInter_of_isOpen {S : Set Ξ±} {f : Ξ± β Set X} (ho : β s β S, IsOpen (f s))
(hS : S.Countable) (hd : β s β S, Dense (f s)) : Dense (β s β S, f s) := by
rw [β sInter_image]
refine dense_sInter_of_isOpen ?_ (hS.image _) ?_ <;> rwa [forall_mem_image]
#align dense_bInter_of_open dense_biInter_of_isOpen
theorem dense_iInter_of_isOpen [Countable ΞΉ] {f : ΞΉ β Set X} (ho : β i, IsOpen (f i))
(hd : β i, Dense (f i)) : Dense (β s, f s) :=
dense_sInter_of_isOpen (forall_mem_range.2 ho) (countable_range _) (forall_mem_range.2 hd)
#align dense_Inter_of_open dense_iInter_of_isOpen
theorem mem_residual {s : Set X} : s β residual X β β t β s, IsGΞ΄ t β§ Dense t := by
constructor
Β· rw [mem_residual_iff]
rintro β¨S, hSo, hSd, Sct, Ssβ©
refine β¨_, Ss, β¨_, fun t ht => hSo _ ht, Sct, rflβ©, ?_β©
exact dense_sInter_of_isOpen hSo Sct hSd
rintro β¨t, ts, ho, hdβ©
exact mem_of_superset (residual_of_dense_GΞ΄ ho hd) ts
#align mem_residual mem_residual
theorem eventually_residual {p : X β Prop} :
(βαΆ x in residual X, p x) β β t : Set X, IsGΞ΄ t β§ Dense t β§ β x β t, p x := by
simp only [Filter.Eventually, mem_residual, subset_def, mem_setOf_eq]
tauto
#align eventually_residual eventually_residual
theorem dense_of_mem_residual {s : Set X} (hs : s β residual X) : Dense s :=
let β¨_, hts, _, hdβ© := mem_residual.1 hs
hd.mono hts
#align dense_of_mem_residual dense_of_mem_residual
theorem dense_sInter_of_GΞ΄ {S : Set (Set X)} (ho : β s β S, IsGΞ΄ s) (hS : S.Countable)
(hd : β s β S, Dense s) : Dense (ββ S) :=
dense_of_mem_residual ((countable_sInter_mem hS).mpr
(fun _ hs => residual_of_dense_GΞ΄ (ho _ hs) (hd _ hs)))
set_option linter.uppercaseLean3 false in
#align dense_sInter_of_GΞ΄ dense_sInter_of_GΞ΄
theorem dense_iInter_of_GΞ΄ [Countable ΞΉ] {f : ΞΉ β Set X} (ho : β s, IsGΞ΄ (f s))
(hd : β s, Dense (f s)) : Dense (β s, f s) :=
dense_sInter_of_GΞ΄ (forall_mem_range.2 βΉ_βΊ) (countable_range _) (forall_mem_range.2 βΉ_βΊ)
set_option linter.uppercaseLean3 false in
#align dense_Inter_of_GΞ΄ dense_iInter_of_GΞ΄
theorem dense_biInter_of_GΞ΄ {S : Set Ξ±} {f : β x β S, Set X} (ho : β s (H : s β S), IsGΞ΄ (f s H))
(hS : S.Countable) (hd : β s (H : s β S), Dense (f s H)) : Dense (β s β S, f s βΉ_βΊ) := by
rw [biInter_eq_iInter]
haveI := hS.to_subtype
exact dense_iInter_of_GΞ΄ (fun s => ho s s.2) fun s => hd s s.2
set_option linter.uppercaseLean3 false in
#align dense_bInter_of_GΞ΄ dense_biInter_of_GΞ΄
theorem Dense.inter_of_GΞ΄ {s t : Set X} (hs : IsGΞ΄ s) (ht : IsGΞ΄ t) (hsc : Dense s)
(htc : Dense t) : Dense (s β© t) := by
rw [inter_eq_iInter]
apply dense_iInter_of_GΞ΄ <;> simp [Bool.forall_bool, *]
set_option linter.uppercaseLean3 false in
#align dense.inter_of_GΞ΄ Dense.inter_of_GΞ΄
| Mathlib/Topology/Baire/Lemmas.lean | 132 | 145 | theorem IsGΞ΄.dense_iUnion_interior_of_closed [Countable ΞΉ] {s : Set X} (hs : IsGΞ΄ s) (hd : Dense s)
{f : ΞΉ β Set X} (hc : β i, IsClosed (f i)) (hU : s β β i, f i) :
Dense (β i, interior (f i)) := by |
let g i := (frontier (f i))αΆ
have hgo : β i, IsOpen (g i) := fun i => isClosed_frontier.isOpen_compl
have hgd : Dense (β i, g i) := by
refine dense_iInter_of_isOpen hgo fun i x => ?_
rw [closure_compl, interior_frontier (hc _)]
exact id
refine (hd.inter_of_GΞ΄ hs (.iInter_of_isOpen fun i => (hgo i)) hgd).mono ?_
rintro x β¨hxs, hxgβ©
rw [mem_iInter] at hxg
rcases mem_iUnion.1 (hU hxs) with β¨i, hiβ©
exact mem_iUnion.2 β¨i, self_diff_frontier (f i) βΈ β¨hi, hxg _β©β©
| 11 | 59,874.141715 | 2 | 1.428571 | 7 | 1,523 |
import Mathlib.Combinatorics.Enumerative.DoubleCounting
import Mathlib.Combinatorics.SimpleGraph.AdjMatrix
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Set.Finite
#align_import combinatorics.simple_graph.strongly_regular from "leanprover-community/mathlib"@"2b35fc7bea4640cb75e477e83f32fbd538920822"
open Finset
universe u
namespace SimpleGraph
variable {V : Type u} [Fintype V] [DecidableEq V]
variable (G : SimpleGraph V) [DecidableRel G.Adj]
structure IsSRGWith (n k β ΞΌ : β) : Prop where
card : Fintype.card V = n
regular : G.IsRegularOfDegree k
of_adj : β v w : V, G.Adj v w β Fintype.card (G.commonNeighbors v w) = β
of_not_adj : Pairwise fun v w => Β¬G.Adj v w β Fintype.card (G.commonNeighbors v w) = ΞΌ
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with SimpleGraph.IsSRGWith
variable {G} {n k β ΞΌ : β}
theorem bot_strongly_regular : (β₯ : SimpleGraph V).IsSRGWith (Fintype.card V) 0 β 0 where
card := rfl
regular := bot_degree
of_adj := fun v w h => h.elim
of_not_adj := fun v w _h => by
simp only [card_eq_zero, Fintype.card_ofFinset, forall_true_left, not_false_iff, bot_adj]
ext
simp [mem_commonNeighbors]
#align simple_graph.bot_strongly_regular SimpleGraph.bot_strongly_regular
theorem IsSRGWith.top :
(β€ : SimpleGraph V).IsSRGWith (Fintype.card V) (Fintype.card V - 1) (Fintype.card V - 2) ΞΌ where
card := rfl
regular := IsRegularOfDegree.top
of_adj := fun v w h => by
rw [card_commonNeighbors_top]
exact h
of_not_adj := fun v w h h' => False.elim (h' ((top_adj v w).2 h))
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.top SimpleGraph.IsSRGWith.top
| Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean | 84 | 95 | theorem IsSRGWith.card_neighborFinset_union_eq {v w : V} (h : G.IsSRGWith n k β ΞΌ) :
(G.neighborFinset v βͺ G.neighborFinset w).card =
2 * k - Fintype.card (G.commonNeighbors v w) := by |
apply Nat.add_right_cancel (m := Fintype.card (G.commonNeighbors v w))
rw [Nat.sub_add_cancel, β Set.toFinset_card]
-- Porting note: Set.toFinset_inter needs workaround to use unification to solve for one of the
-- instance arguments:
Β· simp [commonNeighbors, @Set.toFinset_inter _ _ _ _ _ _ (_),
β neighborFinset_def, Finset.card_union_add_card_inter, card_neighborFinset_eq_degree,
h.regular.degree_eq, two_mul]
Β· apply le_trans (card_commonNeighbors_le_degree_left _ _ _)
simp [h.regular.degree_eq, two_mul]
| 9 | 8,103.083928 | 2 | 1.428571 | 7 | 1,524 |
import Mathlib.Combinatorics.Enumerative.DoubleCounting
import Mathlib.Combinatorics.SimpleGraph.AdjMatrix
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Set.Finite
#align_import combinatorics.simple_graph.strongly_regular from "leanprover-community/mathlib"@"2b35fc7bea4640cb75e477e83f32fbd538920822"
open Finset
universe u
namespace SimpleGraph
variable {V : Type u} [Fintype V] [DecidableEq V]
variable (G : SimpleGraph V) [DecidableRel G.Adj]
structure IsSRGWith (n k β ΞΌ : β) : Prop where
card : Fintype.card V = n
regular : G.IsRegularOfDegree k
of_adj : β v w : V, G.Adj v w β Fintype.card (G.commonNeighbors v w) = β
of_not_adj : Pairwise fun v w => Β¬G.Adj v w β Fintype.card (G.commonNeighbors v w) = ΞΌ
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with SimpleGraph.IsSRGWith
variable {G} {n k β ΞΌ : β}
theorem bot_strongly_regular : (β₯ : SimpleGraph V).IsSRGWith (Fintype.card V) 0 β 0 where
card := rfl
regular := bot_degree
of_adj := fun v w h => h.elim
of_not_adj := fun v w _h => by
simp only [card_eq_zero, Fintype.card_ofFinset, forall_true_left, not_false_iff, bot_adj]
ext
simp [mem_commonNeighbors]
#align simple_graph.bot_strongly_regular SimpleGraph.bot_strongly_regular
theorem IsSRGWith.top :
(β€ : SimpleGraph V).IsSRGWith (Fintype.card V) (Fintype.card V - 1) (Fintype.card V - 2) ΞΌ where
card := rfl
regular := IsRegularOfDegree.top
of_adj := fun v w h => by
rw [card_commonNeighbors_top]
exact h
of_not_adj := fun v w h h' => False.elim (h' ((top_adj v w).2 h))
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.top SimpleGraph.IsSRGWith.top
theorem IsSRGWith.card_neighborFinset_union_eq {v w : V} (h : G.IsSRGWith n k β ΞΌ) :
(G.neighborFinset v βͺ G.neighborFinset w).card =
2 * k - Fintype.card (G.commonNeighbors v w) := by
apply Nat.add_right_cancel (m := Fintype.card (G.commonNeighbors v w))
rw [Nat.sub_add_cancel, β Set.toFinset_card]
-- Porting note: Set.toFinset_inter needs workaround to use unification to solve for one of the
-- instance arguments:
Β· simp [commonNeighbors, @Set.toFinset_inter _ _ _ _ _ _ (_),
β neighborFinset_def, Finset.card_union_add_card_inter, card_neighborFinset_eq_degree,
h.regular.degree_eq, two_mul]
Β· apply le_trans (card_commonNeighbors_le_degree_left _ _ _)
simp [h.regular.degree_eq, two_mul]
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_eq SimpleGraph.IsSRGWith.card_neighborFinset_union_eq
| Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean | 102 | 106 | theorem IsSRGWith.card_neighborFinset_union_of_not_adj {v w : V} (h : G.IsSRGWith n k β ΞΌ)
(hne : v β w) (ha : Β¬G.Adj v w) :
(G.neighborFinset v βͺ G.neighborFinset w).card = 2 * k - ΞΌ := by |
rw [β h.of_not_adj hne ha]
apply h.card_neighborFinset_union_eq
| 2 | 7.389056 | 1 | 1.428571 | 7 | 1,524 |
import Mathlib.Combinatorics.Enumerative.DoubleCounting
import Mathlib.Combinatorics.SimpleGraph.AdjMatrix
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Set.Finite
#align_import combinatorics.simple_graph.strongly_regular from "leanprover-community/mathlib"@"2b35fc7bea4640cb75e477e83f32fbd538920822"
open Finset
universe u
namespace SimpleGraph
variable {V : Type u} [Fintype V] [DecidableEq V]
variable (G : SimpleGraph V) [DecidableRel G.Adj]
structure IsSRGWith (n k β ΞΌ : β) : Prop where
card : Fintype.card V = n
regular : G.IsRegularOfDegree k
of_adj : β v w : V, G.Adj v w β Fintype.card (G.commonNeighbors v w) = β
of_not_adj : Pairwise fun v w => Β¬G.Adj v w β Fintype.card (G.commonNeighbors v w) = ΞΌ
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with SimpleGraph.IsSRGWith
variable {G} {n k β ΞΌ : β}
theorem bot_strongly_regular : (β₯ : SimpleGraph V).IsSRGWith (Fintype.card V) 0 β 0 where
card := rfl
regular := bot_degree
of_adj := fun v w h => h.elim
of_not_adj := fun v w _h => by
simp only [card_eq_zero, Fintype.card_ofFinset, forall_true_left, not_false_iff, bot_adj]
ext
simp [mem_commonNeighbors]
#align simple_graph.bot_strongly_regular SimpleGraph.bot_strongly_regular
theorem IsSRGWith.top :
(β€ : SimpleGraph V).IsSRGWith (Fintype.card V) (Fintype.card V - 1) (Fintype.card V - 2) ΞΌ where
card := rfl
regular := IsRegularOfDegree.top
of_adj := fun v w h => by
rw [card_commonNeighbors_top]
exact h
of_not_adj := fun v w h h' => False.elim (h' ((top_adj v w).2 h))
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.top SimpleGraph.IsSRGWith.top
theorem IsSRGWith.card_neighborFinset_union_eq {v w : V} (h : G.IsSRGWith n k β ΞΌ) :
(G.neighborFinset v βͺ G.neighborFinset w).card =
2 * k - Fintype.card (G.commonNeighbors v w) := by
apply Nat.add_right_cancel (m := Fintype.card (G.commonNeighbors v w))
rw [Nat.sub_add_cancel, β Set.toFinset_card]
-- Porting note: Set.toFinset_inter needs workaround to use unification to solve for one of the
-- instance arguments:
Β· simp [commonNeighbors, @Set.toFinset_inter _ _ _ _ _ _ (_),
β neighborFinset_def, Finset.card_union_add_card_inter, card_neighborFinset_eq_degree,
h.regular.degree_eq, two_mul]
Β· apply le_trans (card_commonNeighbors_le_degree_left _ _ _)
simp [h.regular.degree_eq, two_mul]
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_eq SimpleGraph.IsSRGWith.card_neighborFinset_union_eq
theorem IsSRGWith.card_neighborFinset_union_of_not_adj {v w : V} (h : G.IsSRGWith n k β ΞΌ)
(hne : v β w) (ha : Β¬G.Adj v w) :
(G.neighborFinset v βͺ G.neighborFinset w).card = 2 * k - ΞΌ := by
rw [β h.of_not_adj hne ha]
apply h.card_neighborFinset_union_eq
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_of_not_adj SimpleGraph.IsSRGWith.card_neighborFinset_union_of_not_adj
| Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean | 110 | 113 | theorem IsSRGWith.card_neighborFinset_union_of_adj {v w : V} (h : G.IsSRGWith n k β ΞΌ)
(ha : G.Adj v w) : (G.neighborFinset v βͺ G.neighborFinset w).card = 2 * k - β := by |
rw [β h.of_adj v w ha]
apply h.card_neighborFinset_union_eq
| 2 | 7.389056 | 1 | 1.428571 | 7 | 1,524 |
import Mathlib.Combinatorics.Enumerative.DoubleCounting
import Mathlib.Combinatorics.SimpleGraph.AdjMatrix
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Set.Finite
#align_import combinatorics.simple_graph.strongly_regular from "leanprover-community/mathlib"@"2b35fc7bea4640cb75e477e83f32fbd538920822"
open Finset
universe u
namespace SimpleGraph
variable {V : Type u} [Fintype V] [DecidableEq V]
variable (G : SimpleGraph V) [DecidableRel G.Adj]
structure IsSRGWith (n k β ΞΌ : β) : Prop where
card : Fintype.card V = n
regular : G.IsRegularOfDegree k
of_adj : β v w : V, G.Adj v w β Fintype.card (G.commonNeighbors v w) = β
of_not_adj : Pairwise fun v w => Β¬G.Adj v w β Fintype.card (G.commonNeighbors v w) = ΞΌ
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with SimpleGraph.IsSRGWith
variable {G} {n k β ΞΌ : β}
theorem bot_strongly_regular : (β₯ : SimpleGraph V).IsSRGWith (Fintype.card V) 0 β 0 where
card := rfl
regular := bot_degree
of_adj := fun v w h => h.elim
of_not_adj := fun v w _h => by
simp only [card_eq_zero, Fintype.card_ofFinset, forall_true_left, not_false_iff, bot_adj]
ext
simp [mem_commonNeighbors]
#align simple_graph.bot_strongly_regular SimpleGraph.bot_strongly_regular
theorem IsSRGWith.top :
(β€ : SimpleGraph V).IsSRGWith (Fintype.card V) (Fintype.card V - 1) (Fintype.card V - 2) ΞΌ where
card := rfl
regular := IsRegularOfDegree.top
of_adj := fun v w h => by
rw [card_commonNeighbors_top]
exact h
of_not_adj := fun v w h h' => False.elim (h' ((top_adj v w).2 h))
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.top SimpleGraph.IsSRGWith.top
theorem IsSRGWith.card_neighborFinset_union_eq {v w : V} (h : G.IsSRGWith n k β ΞΌ) :
(G.neighborFinset v βͺ G.neighborFinset w).card =
2 * k - Fintype.card (G.commonNeighbors v w) := by
apply Nat.add_right_cancel (m := Fintype.card (G.commonNeighbors v w))
rw [Nat.sub_add_cancel, β Set.toFinset_card]
-- Porting note: Set.toFinset_inter needs workaround to use unification to solve for one of the
-- instance arguments:
Β· simp [commonNeighbors, @Set.toFinset_inter _ _ _ _ _ _ (_),
β neighborFinset_def, Finset.card_union_add_card_inter, card_neighborFinset_eq_degree,
h.regular.degree_eq, two_mul]
Β· apply le_trans (card_commonNeighbors_le_degree_left _ _ _)
simp [h.regular.degree_eq, two_mul]
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_eq SimpleGraph.IsSRGWith.card_neighborFinset_union_eq
theorem IsSRGWith.card_neighborFinset_union_of_not_adj {v w : V} (h : G.IsSRGWith n k β ΞΌ)
(hne : v β w) (ha : Β¬G.Adj v w) :
(G.neighborFinset v βͺ G.neighborFinset w).card = 2 * k - ΞΌ := by
rw [β h.of_not_adj hne ha]
apply h.card_neighborFinset_union_eq
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_of_not_adj SimpleGraph.IsSRGWith.card_neighborFinset_union_of_not_adj
theorem IsSRGWith.card_neighborFinset_union_of_adj {v w : V} (h : G.IsSRGWith n k β ΞΌ)
(ha : G.Adj v w) : (G.neighborFinset v βͺ G.neighborFinset w).card = 2 * k - β := by
rw [β h.of_adj v w ha]
apply h.card_neighborFinset_union_eq
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_of_adj SimpleGraph.IsSRGWith.card_neighborFinset_union_of_adj
| Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean | 117 | 122 | theorem compl_neighborFinset_sdiff_inter_eq {v w : V} :
(G.neighborFinset v)αΆ \ {v} β© ((G.neighborFinset w)αΆ \ {w}) =
((G.neighborFinset v)αΆ β© (G.neighborFinset w)αΆ) \ ({w} βͺ {v}) := by |
ext
rw [β not_iff_not]
simp [imp_iff_not_or, or_assoc, or_comm, or_left_comm]
| 3 | 20.085537 | 1 | 1.428571 | 7 | 1,524 |
import Mathlib.Combinatorics.Enumerative.DoubleCounting
import Mathlib.Combinatorics.SimpleGraph.AdjMatrix
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Set.Finite
#align_import combinatorics.simple_graph.strongly_regular from "leanprover-community/mathlib"@"2b35fc7bea4640cb75e477e83f32fbd538920822"
open Finset
universe u
namespace SimpleGraph
variable {V : Type u} [Fintype V] [DecidableEq V]
variable (G : SimpleGraph V) [DecidableRel G.Adj]
structure IsSRGWith (n k β ΞΌ : β) : Prop where
card : Fintype.card V = n
regular : G.IsRegularOfDegree k
of_adj : β v w : V, G.Adj v w β Fintype.card (G.commonNeighbors v w) = β
of_not_adj : Pairwise fun v w => Β¬G.Adj v w β Fintype.card (G.commonNeighbors v w) = ΞΌ
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with SimpleGraph.IsSRGWith
variable {G} {n k β ΞΌ : β}
theorem bot_strongly_regular : (β₯ : SimpleGraph V).IsSRGWith (Fintype.card V) 0 β 0 where
card := rfl
regular := bot_degree
of_adj := fun v w h => h.elim
of_not_adj := fun v w _h => by
simp only [card_eq_zero, Fintype.card_ofFinset, forall_true_left, not_false_iff, bot_adj]
ext
simp [mem_commonNeighbors]
#align simple_graph.bot_strongly_regular SimpleGraph.bot_strongly_regular
theorem IsSRGWith.top :
(β€ : SimpleGraph V).IsSRGWith (Fintype.card V) (Fintype.card V - 1) (Fintype.card V - 2) ΞΌ where
card := rfl
regular := IsRegularOfDegree.top
of_adj := fun v w h => by
rw [card_commonNeighbors_top]
exact h
of_not_adj := fun v w h h' => False.elim (h' ((top_adj v w).2 h))
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.top SimpleGraph.IsSRGWith.top
theorem IsSRGWith.card_neighborFinset_union_eq {v w : V} (h : G.IsSRGWith n k β ΞΌ) :
(G.neighborFinset v βͺ G.neighborFinset w).card =
2 * k - Fintype.card (G.commonNeighbors v w) := by
apply Nat.add_right_cancel (m := Fintype.card (G.commonNeighbors v w))
rw [Nat.sub_add_cancel, β Set.toFinset_card]
-- Porting note: Set.toFinset_inter needs workaround to use unification to solve for one of the
-- instance arguments:
Β· simp [commonNeighbors, @Set.toFinset_inter _ _ _ _ _ _ (_),
β neighborFinset_def, Finset.card_union_add_card_inter, card_neighborFinset_eq_degree,
h.regular.degree_eq, two_mul]
Β· apply le_trans (card_commonNeighbors_le_degree_left _ _ _)
simp [h.regular.degree_eq, two_mul]
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_eq SimpleGraph.IsSRGWith.card_neighborFinset_union_eq
theorem IsSRGWith.card_neighborFinset_union_of_not_adj {v w : V} (h : G.IsSRGWith n k β ΞΌ)
(hne : v β w) (ha : Β¬G.Adj v w) :
(G.neighborFinset v βͺ G.neighborFinset w).card = 2 * k - ΞΌ := by
rw [β h.of_not_adj hne ha]
apply h.card_neighborFinset_union_eq
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_of_not_adj SimpleGraph.IsSRGWith.card_neighborFinset_union_of_not_adj
theorem IsSRGWith.card_neighborFinset_union_of_adj {v w : V} (h : G.IsSRGWith n k β ΞΌ)
(ha : G.Adj v w) : (G.neighborFinset v βͺ G.neighborFinset w).card = 2 * k - β := by
rw [β h.of_adj v w ha]
apply h.card_neighborFinset_union_eq
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_of_adj SimpleGraph.IsSRGWith.card_neighborFinset_union_of_adj
theorem compl_neighborFinset_sdiff_inter_eq {v w : V} :
(G.neighborFinset v)αΆ \ {v} β© ((G.neighborFinset w)αΆ \ {w}) =
((G.neighborFinset v)αΆ β© (G.neighborFinset w)αΆ) \ ({w} βͺ {v}) := by
ext
rw [β not_iff_not]
simp [imp_iff_not_or, or_assoc, or_comm, or_left_comm]
#align simple_graph.compl_neighbor_finset_sdiff_inter_eq SimpleGraph.compl_neighborFinset_sdiff_inter_eq
| Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean | 125 | 134 | theorem sdiff_compl_neighborFinset_inter_eq {v w : V} (h : G.Adj v w) :
((G.neighborFinset v)αΆ β© (G.neighborFinset w)αΆ) \ ({w} βͺ {v}) =
(G.neighborFinset v)αΆ β© (G.neighborFinset w)αΆ := by |
ext
simp only [and_imp, mem_union, mem_sdiff, mem_compl, and_iff_left_iff_imp, mem_neighborFinset,
mem_inter, mem_singleton]
rintro hnv hnw (rfl | rfl)
Β· exact hnv h
Β· apply hnw
rwa [adj_comm]
| 7 | 1,096.633158 | 2 | 1.428571 | 7 | 1,524 |
import Mathlib.Combinatorics.Enumerative.DoubleCounting
import Mathlib.Combinatorics.SimpleGraph.AdjMatrix
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Set.Finite
#align_import combinatorics.simple_graph.strongly_regular from "leanprover-community/mathlib"@"2b35fc7bea4640cb75e477e83f32fbd538920822"
open Finset
universe u
namespace SimpleGraph
variable {V : Type u} [Fintype V] [DecidableEq V]
variable (G : SimpleGraph V) [DecidableRel G.Adj]
structure IsSRGWith (n k β ΞΌ : β) : Prop where
card : Fintype.card V = n
regular : G.IsRegularOfDegree k
of_adj : β v w : V, G.Adj v w β Fintype.card (G.commonNeighbors v w) = β
of_not_adj : Pairwise fun v w => Β¬G.Adj v w β Fintype.card (G.commonNeighbors v w) = ΞΌ
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with SimpleGraph.IsSRGWith
variable {G} {n k β ΞΌ : β}
theorem bot_strongly_regular : (β₯ : SimpleGraph V).IsSRGWith (Fintype.card V) 0 β 0 where
card := rfl
regular := bot_degree
of_adj := fun v w h => h.elim
of_not_adj := fun v w _h => by
simp only [card_eq_zero, Fintype.card_ofFinset, forall_true_left, not_false_iff, bot_adj]
ext
simp [mem_commonNeighbors]
#align simple_graph.bot_strongly_regular SimpleGraph.bot_strongly_regular
theorem IsSRGWith.top :
(β€ : SimpleGraph V).IsSRGWith (Fintype.card V) (Fintype.card V - 1) (Fintype.card V - 2) ΞΌ where
card := rfl
regular := IsRegularOfDegree.top
of_adj := fun v w h => by
rw [card_commonNeighbors_top]
exact h
of_not_adj := fun v w h h' => False.elim (h' ((top_adj v w).2 h))
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.top SimpleGraph.IsSRGWith.top
theorem IsSRGWith.card_neighborFinset_union_eq {v w : V} (h : G.IsSRGWith n k β ΞΌ) :
(G.neighborFinset v βͺ G.neighborFinset w).card =
2 * k - Fintype.card (G.commonNeighbors v w) := by
apply Nat.add_right_cancel (m := Fintype.card (G.commonNeighbors v w))
rw [Nat.sub_add_cancel, β Set.toFinset_card]
-- Porting note: Set.toFinset_inter needs workaround to use unification to solve for one of the
-- instance arguments:
Β· simp [commonNeighbors, @Set.toFinset_inter _ _ _ _ _ _ (_),
β neighborFinset_def, Finset.card_union_add_card_inter, card_neighborFinset_eq_degree,
h.regular.degree_eq, two_mul]
Β· apply le_trans (card_commonNeighbors_le_degree_left _ _ _)
simp [h.regular.degree_eq, two_mul]
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_eq SimpleGraph.IsSRGWith.card_neighborFinset_union_eq
theorem IsSRGWith.card_neighborFinset_union_of_not_adj {v w : V} (h : G.IsSRGWith n k β ΞΌ)
(hne : v β w) (ha : Β¬G.Adj v w) :
(G.neighborFinset v βͺ G.neighborFinset w).card = 2 * k - ΞΌ := by
rw [β h.of_not_adj hne ha]
apply h.card_neighborFinset_union_eq
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_of_not_adj SimpleGraph.IsSRGWith.card_neighborFinset_union_of_not_adj
theorem IsSRGWith.card_neighborFinset_union_of_adj {v w : V} (h : G.IsSRGWith n k β ΞΌ)
(ha : G.Adj v w) : (G.neighborFinset v βͺ G.neighborFinset w).card = 2 * k - β := by
rw [β h.of_adj v w ha]
apply h.card_neighborFinset_union_eq
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_of_adj SimpleGraph.IsSRGWith.card_neighborFinset_union_of_adj
theorem compl_neighborFinset_sdiff_inter_eq {v w : V} :
(G.neighborFinset v)αΆ \ {v} β© ((G.neighborFinset w)αΆ \ {w}) =
((G.neighborFinset v)αΆ β© (G.neighborFinset w)αΆ) \ ({w} βͺ {v}) := by
ext
rw [β not_iff_not]
simp [imp_iff_not_or, or_assoc, or_comm, or_left_comm]
#align simple_graph.compl_neighbor_finset_sdiff_inter_eq SimpleGraph.compl_neighborFinset_sdiff_inter_eq
theorem sdiff_compl_neighborFinset_inter_eq {v w : V} (h : G.Adj v w) :
((G.neighborFinset v)αΆ β© (G.neighborFinset w)αΆ) \ ({w} βͺ {v}) =
(G.neighborFinset v)αΆ β© (G.neighborFinset w)αΆ := by
ext
simp only [and_imp, mem_union, mem_sdiff, mem_compl, and_iff_left_iff_imp, mem_neighborFinset,
mem_inter, mem_singleton]
rintro hnv hnw (rfl | rfl)
Β· exact hnv h
Β· apply hnw
rwa [adj_comm]
#align simple_graph.sdiff_compl_neighbor_finset_inter_eq SimpleGraph.sdiff_compl_neighborFinset_inter_eq
| Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean | 137 | 140 | theorem IsSRGWith.compl_is_regular (h : G.IsSRGWith n k β ΞΌ) :
GαΆ.IsRegularOfDegree (n - k - 1) := by |
rw [β h.card, Nat.sub_sub, add_comm, β Nat.sub_sub]
exact h.regular.compl
| 2 | 7.389056 | 1 | 1.428571 | 7 | 1,524 |
import Mathlib.Combinatorics.Enumerative.DoubleCounting
import Mathlib.Combinatorics.SimpleGraph.AdjMatrix
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Set.Finite
#align_import combinatorics.simple_graph.strongly_regular from "leanprover-community/mathlib"@"2b35fc7bea4640cb75e477e83f32fbd538920822"
open Finset
universe u
namespace SimpleGraph
variable {V : Type u} [Fintype V] [DecidableEq V]
variable (G : SimpleGraph V) [DecidableRel G.Adj]
structure IsSRGWith (n k β ΞΌ : β) : Prop where
card : Fintype.card V = n
regular : G.IsRegularOfDegree k
of_adj : β v w : V, G.Adj v w β Fintype.card (G.commonNeighbors v w) = β
of_not_adj : Pairwise fun v w => Β¬G.Adj v w β Fintype.card (G.commonNeighbors v w) = ΞΌ
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with SimpleGraph.IsSRGWith
variable {G} {n k β ΞΌ : β}
theorem bot_strongly_regular : (β₯ : SimpleGraph V).IsSRGWith (Fintype.card V) 0 β 0 where
card := rfl
regular := bot_degree
of_adj := fun v w h => h.elim
of_not_adj := fun v w _h => by
simp only [card_eq_zero, Fintype.card_ofFinset, forall_true_left, not_false_iff, bot_adj]
ext
simp [mem_commonNeighbors]
#align simple_graph.bot_strongly_regular SimpleGraph.bot_strongly_regular
theorem IsSRGWith.top :
(β€ : SimpleGraph V).IsSRGWith (Fintype.card V) (Fintype.card V - 1) (Fintype.card V - 2) ΞΌ where
card := rfl
regular := IsRegularOfDegree.top
of_adj := fun v w h => by
rw [card_commonNeighbors_top]
exact h
of_not_adj := fun v w h h' => False.elim (h' ((top_adj v w).2 h))
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.top SimpleGraph.IsSRGWith.top
theorem IsSRGWith.card_neighborFinset_union_eq {v w : V} (h : G.IsSRGWith n k β ΞΌ) :
(G.neighborFinset v βͺ G.neighborFinset w).card =
2 * k - Fintype.card (G.commonNeighbors v w) := by
apply Nat.add_right_cancel (m := Fintype.card (G.commonNeighbors v w))
rw [Nat.sub_add_cancel, β Set.toFinset_card]
-- Porting note: Set.toFinset_inter needs workaround to use unification to solve for one of the
-- instance arguments:
Β· simp [commonNeighbors, @Set.toFinset_inter _ _ _ _ _ _ (_),
β neighborFinset_def, Finset.card_union_add_card_inter, card_neighborFinset_eq_degree,
h.regular.degree_eq, two_mul]
Β· apply le_trans (card_commonNeighbors_le_degree_left _ _ _)
simp [h.regular.degree_eq, two_mul]
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_eq SimpleGraph.IsSRGWith.card_neighborFinset_union_eq
theorem IsSRGWith.card_neighborFinset_union_of_not_adj {v w : V} (h : G.IsSRGWith n k β ΞΌ)
(hne : v β w) (ha : Β¬G.Adj v w) :
(G.neighborFinset v βͺ G.neighborFinset w).card = 2 * k - ΞΌ := by
rw [β h.of_not_adj hne ha]
apply h.card_neighborFinset_union_eq
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_of_not_adj SimpleGraph.IsSRGWith.card_neighborFinset_union_of_not_adj
theorem IsSRGWith.card_neighborFinset_union_of_adj {v w : V} (h : G.IsSRGWith n k β ΞΌ)
(ha : G.Adj v w) : (G.neighborFinset v βͺ G.neighborFinset w).card = 2 * k - β := by
rw [β h.of_adj v w ha]
apply h.card_neighborFinset_union_eq
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.card_neighbor_finset_union_of_adj SimpleGraph.IsSRGWith.card_neighborFinset_union_of_adj
theorem compl_neighborFinset_sdiff_inter_eq {v w : V} :
(G.neighborFinset v)αΆ \ {v} β© ((G.neighborFinset w)αΆ \ {w}) =
((G.neighborFinset v)αΆ β© (G.neighborFinset w)αΆ) \ ({w} βͺ {v}) := by
ext
rw [β not_iff_not]
simp [imp_iff_not_or, or_assoc, or_comm, or_left_comm]
#align simple_graph.compl_neighbor_finset_sdiff_inter_eq SimpleGraph.compl_neighborFinset_sdiff_inter_eq
theorem sdiff_compl_neighborFinset_inter_eq {v w : V} (h : G.Adj v w) :
((G.neighborFinset v)αΆ β© (G.neighborFinset w)αΆ) \ ({w} βͺ {v}) =
(G.neighborFinset v)αΆ β© (G.neighborFinset w)αΆ := by
ext
simp only [and_imp, mem_union, mem_sdiff, mem_compl, and_iff_left_iff_imp, mem_neighborFinset,
mem_inter, mem_singleton]
rintro hnv hnw (rfl | rfl)
Β· exact hnv h
Β· apply hnw
rwa [adj_comm]
#align simple_graph.sdiff_compl_neighbor_finset_inter_eq SimpleGraph.sdiff_compl_neighborFinset_inter_eq
theorem IsSRGWith.compl_is_regular (h : G.IsSRGWith n k β ΞΌ) :
GαΆ.IsRegularOfDegree (n - k - 1) := by
rw [β h.card, Nat.sub_sub, add_comm, β Nat.sub_sub]
exact h.regular.compl
set_option linter.uppercaseLean3 false in
#align simple_graph.is_SRG_with.compl_is_regular SimpleGraph.IsSRGWith.compl_is_regular
| Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean | 144 | 156 | theorem IsSRGWith.card_commonNeighbors_eq_of_adj_compl (h : G.IsSRGWith n k β ΞΌ) {v w : V}
(ha : GαΆ.Adj v w) : Fintype.card (GαΆ.commonNeighbors v w) = n - (2 * k - ΞΌ) - 2 := by |
simp only [β Set.toFinset_card, commonNeighbors, Set.toFinset_inter, neighborSet_compl,
Set.toFinset_diff, Set.toFinset_singleton, Set.toFinset_compl, β neighborFinset_def]
simp_rw [compl_neighborFinset_sdiff_inter_eq]
have hne : v β w := ne_of_adj _ ha
rw [compl_adj] at ha
rw [card_sdiff, β insert_eq, card_insert_of_not_mem, card_singleton, β Finset.compl_union]
Β· rw [card_compl, h.card_neighborFinset_union_of_not_adj hne ha.2, β h.card]
Β· simp only [hne.symm, not_false_iff, mem_singleton]
Β· intro u
simp only [mem_union, mem_compl, mem_neighborFinset, mem_inter, mem_singleton]
rintro (rfl | rfl) <;> simpa [adj_comm] using ha.2
| 11 | 59,874.141715 | 2 | 1.428571 | 7 | 1,524 |
import Mathlib.Init.Core
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.FieldTheory.Galois
#align_import number_theory.cyclotomic.basic from "leanprover-community/mathlib"@"4b05d3f4f0601dca8abf99c4ec99187682ed0bba"
open Polynomial Algebra FiniteDimensional Set
universe u v w z
variable (n : β+) (S T : Set β+) (A : Type u) (B : Type v) (K : Type w) (L : Type z)
variable [CommRing A] [CommRing B] [Algebra A B]
variable [Field K] [Field L] [Algebra K L]
noncomputable section
@[mk_iff]
class IsCyclotomicExtension : Prop where
exists_prim_root {n : β+} (ha : n β S) : β r : B, IsPrimitiveRoot r n
adjoin_roots : β x : B, x β adjoin A {b : B | β n : β+, n β S β§ b ^ (n : β) = 1}
#align is_cyclotomic_extension IsCyclotomicExtension
namespace IsCyclotomicExtension
section Basic
theorem iff_adjoin_eq_top :
IsCyclotomicExtension S A B β
(β n : β+, n β S β β r : B, IsPrimitiveRoot r n) β§
adjoin A {b : B | β n : β+, n β S β§ b ^ (n : β) = 1} = β€ :=
β¨fun h => β¨fun _ => h.exists_prim_root, Algebra.eq_top_iff.2 h.adjoin_rootsβ©, fun h =>
β¨h.1 _, Algebra.eq_top_iff.1 h.2β©β©
#align is_cyclotomic_extension.iff_adjoin_eq_top IsCyclotomicExtension.iff_adjoin_eq_top
| Mathlib/NumberTheory/Cyclotomic/Basic.lean | 100 | 103 | theorem iff_singleton :
IsCyclotomicExtension {n} A B β
(β r : B, IsPrimitiveRoot r n) β§ β x, x β adjoin A {b : B | b ^ (n : β) = 1} := by |
simp [isCyclotomicExtension_iff]
| 1 | 2.718282 | 0 | 1.428571 | 7 | 1,525 |
import Mathlib.Init.Core
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.FieldTheory.Galois
#align_import number_theory.cyclotomic.basic from "leanprover-community/mathlib"@"4b05d3f4f0601dca8abf99c4ec99187682ed0bba"
open Polynomial Algebra FiniteDimensional Set
universe u v w z
variable (n : β+) (S T : Set β+) (A : Type u) (B : Type v) (K : Type w) (L : Type z)
variable [CommRing A] [CommRing B] [Algebra A B]
variable [Field K] [Field L] [Algebra K L]
noncomputable section
@[mk_iff]
class IsCyclotomicExtension : Prop where
exists_prim_root {n : β+} (ha : n β S) : β r : B, IsPrimitiveRoot r n
adjoin_roots : β x : B, x β adjoin A {b : B | β n : β+, n β S β§ b ^ (n : β) = 1}
#align is_cyclotomic_extension IsCyclotomicExtension
namespace IsCyclotomicExtension
section Basic
theorem iff_adjoin_eq_top :
IsCyclotomicExtension S A B β
(β n : β+, n β S β β r : B, IsPrimitiveRoot r n) β§
adjoin A {b : B | β n : β+, n β S β§ b ^ (n : β) = 1} = β€ :=
β¨fun h => β¨fun _ => h.exists_prim_root, Algebra.eq_top_iff.2 h.adjoin_rootsβ©, fun h =>
β¨h.1 _, Algebra.eq_top_iff.1 h.2β©β©
#align is_cyclotomic_extension.iff_adjoin_eq_top IsCyclotomicExtension.iff_adjoin_eq_top
theorem iff_singleton :
IsCyclotomicExtension {n} A B β
(β r : B, IsPrimitiveRoot r n) β§ β x, x β adjoin A {b : B | b ^ (n : β) = 1} := by
simp [isCyclotomicExtension_iff]
#align is_cyclotomic_extension.iff_singleton IsCyclotomicExtension.iff_singleton
| Mathlib/NumberTheory/Cyclotomic/Basic.lean | 107 | 108 | theorem empty [h : IsCyclotomicExtension β
A B] : (β₯ : Subalgebra A B) = β€ := by |
simpa [Algebra.eq_top_iff, isCyclotomicExtension_iff] using h
| 1 | 2.718282 | 0 | 1.428571 | 7 | 1,525 |
import Mathlib.Init.Core
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.FieldTheory.Galois
#align_import number_theory.cyclotomic.basic from "leanprover-community/mathlib"@"4b05d3f4f0601dca8abf99c4ec99187682ed0bba"
open Polynomial Algebra FiniteDimensional Set
universe u v w z
variable (n : β+) (S T : Set β+) (A : Type u) (B : Type v) (K : Type w) (L : Type z)
variable [CommRing A] [CommRing B] [Algebra A B]
variable [Field K] [Field L] [Algebra K L]
noncomputable section
@[mk_iff]
class IsCyclotomicExtension : Prop where
exists_prim_root {n : β+} (ha : n β S) : β r : B, IsPrimitiveRoot r n
adjoin_roots : β x : B, x β adjoin A {b : B | β n : β+, n β S β§ b ^ (n : β) = 1}
#align is_cyclotomic_extension IsCyclotomicExtension
namespace IsCyclotomicExtension
section Basic
theorem iff_adjoin_eq_top :
IsCyclotomicExtension S A B β
(β n : β+, n β S β β r : B, IsPrimitiveRoot r n) β§
adjoin A {b : B | β n : β+, n β S β§ b ^ (n : β) = 1} = β€ :=
β¨fun h => β¨fun _ => h.exists_prim_root, Algebra.eq_top_iff.2 h.adjoin_rootsβ©, fun h =>
β¨h.1 _, Algebra.eq_top_iff.1 h.2β©β©
#align is_cyclotomic_extension.iff_adjoin_eq_top IsCyclotomicExtension.iff_adjoin_eq_top
theorem iff_singleton :
IsCyclotomicExtension {n} A B β
(β r : B, IsPrimitiveRoot r n) β§ β x, x β adjoin A {b : B | b ^ (n : β) = 1} := by
simp [isCyclotomicExtension_iff]
#align is_cyclotomic_extension.iff_singleton IsCyclotomicExtension.iff_singleton
theorem empty [h : IsCyclotomicExtension β
A B] : (β₯ : Subalgebra A B) = β€ := by
simpa [Algebra.eq_top_iff, isCyclotomicExtension_iff] using h
#align is_cyclotomic_extension.empty IsCyclotomicExtension.empty
theorem singleton_one [h : IsCyclotomicExtension {1} A B] : (β₯ : Subalgebra A B) = β€ :=
Algebra.eq_top_iff.2 fun x => by
simpa [adjoin_singleton_one] using ((isCyclotomicExtension_iff _ _ _).1 h).2 x
#align is_cyclotomic_extension.singleton_one IsCyclotomicExtension.singleton_one
variable {A B}
| Mathlib/NumberTheory/Cyclotomic/Basic.lean | 120 | 126 | theorem singleton_zero_of_bot_eq_top (h : (β₯ : Subalgebra A B) = β€) :
IsCyclotomicExtension β
A B := by |
-- Porting note: Lean3 is able to infer `A`.
refine (iff_adjoin_eq_top _ A _).2
β¨fun s hs => by simp at hs, _root_.eq_top_iff.2 fun x hx => ?_β©
rw [β h] at hx
simpa using hx
| 5 | 148.413159 | 2 | 1.428571 | 7 | 1,525 |
import Mathlib.Init.Core
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.FieldTheory.Galois
#align_import number_theory.cyclotomic.basic from "leanprover-community/mathlib"@"4b05d3f4f0601dca8abf99c4ec99187682ed0bba"
open Polynomial Algebra FiniteDimensional Set
universe u v w z
variable (n : β+) (S T : Set β+) (A : Type u) (B : Type v) (K : Type w) (L : Type z)
variable [CommRing A] [CommRing B] [Algebra A B]
variable [Field K] [Field L] [Algebra K L]
noncomputable section
@[mk_iff]
class IsCyclotomicExtension : Prop where
exists_prim_root {n : β+} (ha : n β S) : β r : B, IsPrimitiveRoot r n
adjoin_roots : β x : B, x β adjoin A {b : B | β n : β+, n β S β§ b ^ (n : β) = 1}
#align is_cyclotomic_extension IsCyclotomicExtension
namespace IsCyclotomicExtension
section Basic
theorem iff_adjoin_eq_top :
IsCyclotomicExtension S A B β
(β n : β+, n β S β β r : B, IsPrimitiveRoot r n) β§
adjoin A {b : B | β n : β+, n β S β§ b ^ (n : β) = 1} = β€ :=
β¨fun h => β¨fun _ => h.exists_prim_root, Algebra.eq_top_iff.2 h.adjoin_rootsβ©, fun h =>
β¨h.1 _, Algebra.eq_top_iff.1 h.2β©β©
#align is_cyclotomic_extension.iff_adjoin_eq_top IsCyclotomicExtension.iff_adjoin_eq_top
theorem iff_singleton :
IsCyclotomicExtension {n} A B β
(β r : B, IsPrimitiveRoot r n) β§ β x, x β adjoin A {b : B | b ^ (n : β) = 1} := by
simp [isCyclotomicExtension_iff]
#align is_cyclotomic_extension.iff_singleton IsCyclotomicExtension.iff_singleton
theorem empty [h : IsCyclotomicExtension β
A B] : (β₯ : Subalgebra A B) = β€ := by
simpa [Algebra.eq_top_iff, isCyclotomicExtension_iff] using h
#align is_cyclotomic_extension.empty IsCyclotomicExtension.empty
theorem singleton_one [h : IsCyclotomicExtension {1} A B] : (β₯ : Subalgebra A B) = β€ :=
Algebra.eq_top_iff.2 fun x => by
simpa [adjoin_singleton_one] using ((isCyclotomicExtension_iff _ _ _).1 h).2 x
#align is_cyclotomic_extension.singleton_one IsCyclotomicExtension.singleton_one
variable {A B}
theorem singleton_zero_of_bot_eq_top (h : (β₯ : Subalgebra A B) = β€) :
IsCyclotomicExtension β
A B := by
-- Porting note: Lean3 is able to infer `A`.
refine (iff_adjoin_eq_top _ A _).2
β¨fun s hs => by simp at hs, _root_.eq_top_iff.2 fun x hx => ?_β©
rw [β h] at hx
simpa using hx
#align is_cyclotomic_extension.singleton_zero_of_bot_eq_top IsCyclotomicExtension.singleton_zero_of_bot_eq_top
variable (A B)
| Mathlib/NumberTheory/Cyclotomic/Basic.lean | 132 | 150 | theorem trans (C : Type w) [CommRing C] [Algebra A C] [Algebra B C] [IsScalarTower A B C]
[hS : IsCyclotomicExtension S A B] [hT : IsCyclotomicExtension T B C]
(h : Function.Injective (algebraMap B C)) : IsCyclotomicExtension (S βͺ T) A C := by |
refine β¨fun hn => ?_, fun x => ?_β©
Β· cases' hn with hn hn
Β· obtain β¨b, hbβ© := ((isCyclotomicExtension_iff _ _ _).1 hS).1 hn
refine β¨algebraMap B C b, ?_β©
exact hb.map_of_injective h
Β· exact ((isCyclotomicExtension_iff _ _ _).1 hT).1 hn
Β· refine adjoin_induction (((isCyclotomicExtension_iff T B _).1 hT).2 x)
(fun c β¨n, hnβ© => subset_adjoin β¨n, Or.inr hn.1, hn.2β©) (fun b => ?_)
(fun x y hx hy => Subalgebra.add_mem _ hx hy) fun x y hx hy => Subalgebra.mul_mem _ hx hy
let f := IsScalarTower.toAlgHom A B C
have hb : f b β (adjoin A {b : B | β a : β+, a β S β§ b ^ (a : β) = 1}).map f :=
β¨b, ((isCyclotomicExtension_iff _ _ _).1 hS).2 b, rflβ©
rw [IsScalarTower.toAlgHom_apply, β adjoin_image] at hb
refine adjoin_mono (fun y hy => ?_) hb
obtain β¨bβ, β¨β¨n, hnβ©, hββ©β© := hy
exact β¨n, β¨mem_union_left T hn.1, by rw [β hβ, β AlgHom.map_pow, hn.2, AlgHom.map_one]β©β©
| 16 | 8,886,110.520508 | 2 | 1.428571 | 7 | 1,525 |
import Mathlib.Init.Core
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.FieldTheory.Galois
#align_import number_theory.cyclotomic.basic from "leanprover-community/mathlib"@"4b05d3f4f0601dca8abf99c4ec99187682ed0bba"
open Polynomial Algebra FiniteDimensional Set
universe u v w z
variable (n : β+) (S T : Set β+) (A : Type u) (B : Type v) (K : Type w) (L : Type z)
variable [CommRing A] [CommRing B] [Algebra A B]
variable [Field K] [Field L] [Algebra K L]
noncomputable section
@[mk_iff]
class IsCyclotomicExtension : Prop where
exists_prim_root {n : β+} (ha : n β S) : β r : B, IsPrimitiveRoot r n
adjoin_roots : β x : B, x β adjoin A {b : B | β n : β+, n β S β§ b ^ (n : β) = 1}
#align is_cyclotomic_extension IsCyclotomicExtension
namespace IsCyclotomicExtension
section Basic
theorem iff_adjoin_eq_top :
IsCyclotomicExtension S A B β
(β n : β+, n β S β β r : B, IsPrimitiveRoot r n) β§
adjoin A {b : B | β n : β+, n β S β§ b ^ (n : β) = 1} = β€ :=
β¨fun h => β¨fun _ => h.exists_prim_root, Algebra.eq_top_iff.2 h.adjoin_rootsβ©, fun h =>
β¨h.1 _, Algebra.eq_top_iff.1 h.2β©β©
#align is_cyclotomic_extension.iff_adjoin_eq_top IsCyclotomicExtension.iff_adjoin_eq_top
theorem iff_singleton :
IsCyclotomicExtension {n} A B β
(β r : B, IsPrimitiveRoot r n) β§ β x, x β adjoin A {b : B | b ^ (n : β) = 1} := by
simp [isCyclotomicExtension_iff]
#align is_cyclotomic_extension.iff_singleton IsCyclotomicExtension.iff_singleton
theorem empty [h : IsCyclotomicExtension β
A B] : (β₯ : Subalgebra A B) = β€ := by
simpa [Algebra.eq_top_iff, isCyclotomicExtension_iff] using h
#align is_cyclotomic_extension.empty IsCyclotomicExtension.empty
theorem singleton_one [h : IsCyclotomicExtension {1} A B] : (β₯ : Subalgebra A B) = β€ :=
Algebra.eq_top_iff.2 fun x => by
simpa [adjoin_singleton_one] using ((isCyclotomicExtension_iff _ _ _).1 h).2 x
#align is_cyclotomic_extension.singleton_one IsCyclotomicExtension.singleton_one
variable {A B}
theorem singleton_zero_of_bot_eq_top (h : (β₯ : Subalgebra A B) = β€) :
IsCyclotomicExtension β
A B := by
-- Porting note: Lean3 is able to infer `A`.
refine (iff_adjoin_eq_top _ A _).2
β¨fun s hs => by simp at hs, _root_.eq_top_iff.2 fun x hx => ?_β©
rw [β h] at hx
simpa using hx
#align is_cyclotomic_extension.singleton_zero_of_bot_eq_top IsCyclotomicExtension.singleton_zero_of_bot_eq_top
variable (A B)
theorem trans (C : Type w) [CommRing C] [Algebra A C] [Algebra B C] [IsScalarTower A B C]
[hS : IsCyclotomicExtension S A B] [hT : IsCyclotomicExtension T B C]
(h : Function.Injective (algebraMap B C)) : IsCyclotomicExtension (S βͺ T) A C := by
refine β¨fun hn => ?_, fun x => ?_β©
Β· cases' hn with hn hn
Β· obtain β¨b, hbβ© := ((isCyclotomicExtension_iff _ _ _).1 hS).1 hn
refine β¨algebraMap B C b, ?_β©
exact hb.map_of_injective h
Β· exact ((isCyclotomicExtension_iff _ _ _).1 hT).1 hn
Β· refine adjoin_induction (((isCyclotomicExtension_iff T B _).1 hT).2 x)
(fun c β¨n, hnβ© => subset_adjoin β¨n, Or.inr hn.1, hn.2β©) (fun b => ?_)
(fun x y hx hy => Subalgebra.add_mem _ hx hy) fun x y hx hy => Subalgebra.mul_mem _ hx hy
let f := IsScalarTower.toAlgHom A B C
have hb : f b β (adjoin A {b : B | β a : β+, a β S β§ b ^ (a : β) = 1}).map f :=
β¨b, ((isCyclotomicExtension_iff _ _ _).1 hS).2 b, rflβ©
rw [IsScalarTower.toAlgHom_apply, β adjoin_image] at hb
refine adjoin_mono (fun y hy => ?_) hb
obtain β¨bβ, β¨β¨n, hnβ©, hββ©β© := hy
exact β¨n, β¨mem_union_left T hn.1, by rw [β hβ, β AlgHom.map_pow, hn.2, AlgHom.map_one]β©β©
#align is_cyclotomic_extension.trans IsCyclotomicExtension.trans
@[nontriviality]
| Mathlib/NumberTheory/Cyclotomic/Basic.lean | 154 | 168 | theorem subsingleton_iff [Subsingleton B] : IsCyclotomicExtension S A B β S = { } β¨ S = {1} := by |
have : Subsingleton (Subalgebra A B) := inferInstance
constructor
Β· rintro β¨hprim, -β©
rw [β subset_singleton_iff_eq]
intro t ht
obtain β¨ΞΆ, hΞΆβ© := hprim ht
rw [mem_singleton_iff, β PNat.coe_eq_one_iff]
exact mod_cast hΞΆ.unique (IsPrimitiveRoot.of_subsingleton ΞΆ)
Β· rintro (rfl | rfl)
-- Porting note: `R := A` was not needed.
Β· exact β¨fun h => h.elim, fun x => by convert (mem_top (R := A) : x β β€)β©
Β· rw [iff_singleton]
exact β¨β¨0, IsPrimitiveRoot.of_subsingleton 0β©,
fun x => by convert (mem_top (R := A) : x β β€)β©
| 14 | 1,202,604.284165 | 2 | 1.428571 | 7 | 1,525 |
import Mathlib.Init.Core
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.FieldTheory.Galois
#align_import number_theory.cyclotomic.basic from "leanprover-community/mathlib"@"4b05d3f4f0601dca8abf99c4ec99187682ed0bba"
open Polynomial Algebra FiniteDimensional Set
universe u v w z
variable (n : β+) (S T : Set β+) (A : Type u) (B : Type v) (K : Type w) (L : Type z)
variable [CommRing A] [CommRing B] [Algebra A B]
variable [Field K] [Field L] [Algebra K L]
noncomputable section
@[mk_iff]
class IsCyclotomicExtension : Prop where
exists_prim_root {n : β+} (ha : n β S) : β r : B, IsPrimitiveRoot r n
adjoin_roots : β x : B, x β adjoin A {b : B | β n : β+, n β S β§ b ^ (n : β) = 1}
#align is_cyclotomic_extension IsCyclotomicExtension
namespace IsCyclotomicExtension
section
variable {A B}
| Mathlib/NumberTheory/Cyclotomic/Basic.lean | 368 | 384 | theorem adjoin_roots_cyclotomic_eq_adjoin_nth_roots [IsDomain B] {ΞΆ : B} {n : β+}
(hΞΆ : IsPrimitiveRoot ΞΆ n) :
adjoin A ((cyclotomic n A).rootSet B) =
adjoin A {b : B | β a : β+, a β ({n} : Set β+) β§ b ^ (a : β) = 1} := by |
simp only [mem_singleton_iff, exists_eq_left, map_cyclotomic]
refine le_antisymm (adjoin_mono fun x hx => ?_) (adjoin_le fun x hx => ?_)
Β· rw [mem_rootSet'] at hx
simp only [mem_singleton_iff, exists_eq_left, mem_setOf_eq]
rw [isRoot_of_unity_iff n.pos]
refine β¨n, Nat.mem_divisors_self n n.ne_zero, ?_β©
rw [IsRoot.def, β map_cyclotomic n (algebraMap A B), eval_map, β aeval_def]
exact hx.2
Β· simp only [mem_singleton_iff, exists_eq_left, mem_setOf_eq] at hx
obtain β¨i, _, rflβ© := hΞΆ.eq_pow_of_pow_eq_one hx n.pos
refine SetLike.mem_coe.2 (Subalgebra.pow_mem _ (subset_adjoin ?_) _)
rw [mem_rootSet', map_cyclotomic, aeval_def, β eval_map, map_cyclotomic, β IsRoot]
exact β¨cyclotomic_ne_zero n B, hΞΆ.isRoot_cyclotomic n.posβ©
| 13 | 442,413.392009 | 2 | 1.428571 | 7 | 1,525 |
import Mathlib.Init.Core
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.FieldTheory.Galois
#align_import number_theory.cyclotomic.basic from "leanprover-community/mathlib"@"4b05d3f4f0601dca8abf99c4ec99187682ed0bba"
open Polynomial Algebra FiniteDimensional Set
universe u v w z
variable (n : β+) (S T : Set β+) (A : Type u) (B : Type v) (K : Type w) (L : Type z)
variable [CommRing A] [CommRing B] [Algebra A B]
variable [Field K] [Field L] [Algebra K L]
noncomputable section
@[mk_iff]
class IsCyclotomicExtension : Prop where
exists_prim_root {n : β+} (ha : n β S) : β r : B, IsPrimitiveRoot r n
adjoin_roots : β x : B, x β adjoin A {b : B | β n : β+, n β S β§ b ^ (n : β) = 1}
#align is_cyclotomic_extension IsCyclotomicExtension
namespace IsCyclotomicExtension
section
variable {A B}
theorem adjoin_roots_cyclotomic_eq_adjoin_nth_roots [IsDomain B] {ΞΆ : B} {n : β+}
(hΞΆ : IsPrimitiveRoot ΞΆ n) :
adjoin A ((cyclotomic n A).rootSet B) =
adjoin A {b : B | β a : β+, a β ({n} : Set β+) β§ b ^ (a : β) = 1} := by
simp only [mem_singleton_iff, exists_eq_left, map_cyclotomic]
refine le_antisymm (adjoin_mono fun x hx => ?_) (adjoin_le fun x hx => ?_)
Β· rw [mem_rootSet'] at hx
simp only [mem_singleton_iff, exists_eq_left, mem_setOf_eq]
rw [isRoot_of_unity_iff n.pos]
refine β¨n, Nat.mem_divisors_self n n.ne_zero, ?_β©
rw [IsRoot.def, β map_cyclotomic n (algebraMap A B), eval_map, β aeval_def]
exact hx.2
Β· simp only [mem_singleton_iff, exists_eq_left, mem_setOf_eq] at hx
obtain β¨i, _, rflβ© := hΞΆ.eq_pow_of_pow_eq_one hx n.pos
refine SetLike.mem_coe.2 (Subalgebra.pow_mem _ (subset_adjoin ?_) _)
rw [mem_rootSet', map_cyclotomic, aeval_def, β eval_map, map_cyclotomic, β IsRoot]
exact β¨cyclotomic_ne_zero n B, hΞΆ.isRoot_cyclotomic n.posβ©
#align is_cyclotomic_extension.adjoin_roots_cyclotomic_eq_adjoin_nth_roots IsCyclotomicExtension.adjoin_roots_cyclotomic_eq_adjoin_nth_roots
| Mathlib/NumberTheory/Cyclotomic/Basic.lean | 387 | 399 | theorem adjoin_roots_cyclotomic_eq_adjoin_root_cyclotomic {n : β+} [IsDomain B] {ΞΆ : B}
(hΞΆ : IsPrimitiveRoot ΞΆ n) : adjoin A ((cyclotomic n A).rootSet B) = adjoin A {ΞΆ} := by |
refine le_antisymm (adjoin_le fun x hx => ?_) (adjoin_mono fun x hx => ?_)
Β· suffices hx : x ^ n.1 = 1 by
obtain β¨i, _, rflβ© := hΞΆ.eq_pow_of_pow_eq_one hx n.pos
exact SetLike.mem_coe.2 (Subalgebra.pow_mem _ (subset_adjoin <| mem_singleton ΞΆ) _)
refine (isRoot_of_unity_iff n.pos B).2 ?_
refine β¨n, Nat.mem_divisors_self n n.ne_zero, ?_β©
rw [mem_rootSet', aeval_def, β eval_map, map_cyclotomic, β IsRoot] at hx
exact hx.2
Β· simp only [mem_singleton_iff, exists_eq_left, mem_setOf_eq] at hx
simpa only [hx, mem_rootSet', map_cyclotomic, aeval_def, β eval_map, IsRoot] using
And.intro (cyclotomic_ne_zero n B) (hΞΆ.isRoot_cyclotomic n.pos)
| 11 | 59,874.141715 | 2 | 1.428571 | 7 | 1,525 |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
namespace Ideal
noncomputable section
open Polynomial
variable {R : Type*} [CommRing R]
| Mathlib/RingTheory/Polynomial/Quotient.lean | 87 | 91 | theorem quotient_map_C_eq_zero {I : Ideal R} :
β a β I, ((Quotient.mk (map (C : R β+* R[X]) I : Ideal R[X])).comp C) a = 0 := by |
intro a ha
rw [RingHom.comp_apply, Quotient.eq_zero_iff_mem]
exact mem_map_of_mem _ ha
| 3 | 20.085537 | 1 | 1.428571 | 7 | 1,526 |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
namespace Ideal
noncomputable section
open Polynomial
variable {R : Type*} [CommRing R]
theorem quotient_map_C_eq_zero {I : Ideal R} :
β a β I, ((Quotient.mk (map (C : R β+* R[X]) I : Ideal R[X])).comp C) a = 0 := by
intro a ha
rw [RingHom.comp_apply, Quotient.eq_zero_iff_mem]
exact mem_map_of_mem _ ha
#align ideal.quotient_map_C_eq_zero Ideal.quotient_map_C_eq_zero
| Mathlib/RingTheory/Polynomial/Quotient.lean | 94 | 107 | theorem evalβ_C_mk_eq_zero {I : Ideal R} :
β f β (map (C : R β+* R[X]) I : Ideal R[X]), evalβRingHom (C.comp (Quotient.mk I)) X f = 0 := by |
intro a ha
rw [β sum_monomial_eq a]
dsimp
rw [evalβ_sum]
refine Finset.sum_eq_zero fun n _ => ?_
dsimp
rw [evalβ_monomial (C.comp (Quotient.mk I)) X]
refine mul_eq_zero_of_left (Polynomial.ext fun m => ?_) (X ^ n)
erw [coeff_C]
by_cases h : m = 0
Β· simpa [h] using Quotient.eq_zero_iff_mem.2 ((mem_map_C_iff.1 ha) n)
Β· simp [h]
| 12 | 162,754.791419 | 2 | 1.428571 | 7 | 1,526 |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
namespace Ideal
noncomputable section
open Polynomial
variable {R : Type*} [CommRing R]
theorem quotient_map_C_eq_zero {I : Ideal R} :
β a β I, ((Quotient.mk (map (C : R β+* R[X]) I : Ideal R[X])).comp C) a = 0 := by
intro a ha
rw [RingHom.comp_apply, Quotient.eq_zero_iff_mem]
exact mem_map_of_mem _ ha
#align ideal.quotient_map_C_eq_zero Ideal.quotient_map_C_eq_zero
theorem evalβ_C_mk_eq_zero {I : Ideal R} :
β f β (map (C : R β+* R[X]) I : Ideal R[X]), evalβRingHom (C.comp (Quotient.mk I)) X f = 0 := by
intro a ha
rw [β sum_monomial_eq a]
dsimp
rw [evalβ_sum]
refine Finset.sum_eq_zero fun n _ => ?_
dsimp
rw [evalβ_monomial (C.comp (Quotient.mk I)) X]
refine mul_eq_zero_of_left (Polynomial.ext fun m => ?_) (X ^ n)
erw [coeff_C]
by_cases h : m = 0
Β· simpa [h] using Quotient.eq_zero_iff_mem.2 ((mem_map_C_iff.1 ha) n)
Β· simp [h]
#align ideal.evalβ_C_mk_eq_zero Ideal.evalβ_C_mk_eq_zero
def polynomialQuotientEquivQuotientPolynomial (I : Ideal R) :
(R β§Έ I)[X] β+* R[X] β§Έ (map C I : Ideal R[X]) where
toFun :=
evalβRingHom
(Quotient.lift I ((Quotient.mk (map C I : Ideal R[X])).comp C) quotient_map_C_eq_zero)
(Quotient.mk (map C I : Ideal R[X]) X)
invFun :=
Quotient.lift (map C I : Ideal R[X]) (evalβRingHom (C.comp (Quotient.mk I)) X)
evalβ_C_mk_eq_zero
map_mul' f g := by simp only [coe_evalβRingHom, evalβ_mul]
map_add' f g := by simp only [evalβ_add, coe_evalβRingHom]
left_inv := by
intro f
refine Polynomial.induction_on' f ?_ ?_
Β· intro p q hp hq
simp only [coe_evalβRingHom] at hp hq
simp only [coe_evalβRingHom, hp, hq, RingHom.map_add]
Β· rintro n β¨xβ©
simp only [β smul_X_eq_monomial, C_mul', Quotient.lift_mk, Submodule.Quotient.quot_mk_eq_mk,
Quotient.mk_eq_mk, evalβ_X_pow, evalβ_smul, coe_evalβRingHom, RingHom.map_pow, evalβ_C,
RingHom.coe_comp, RingHom.map_mul, evalβ_X, Function.comp_apply]
right_inv := by
rintro β¨fβ©
refine Polynomial.induction_on' f ?_ ?_
Β· -- Porting note: was `simp_intro p q hp hq`
intros p q hp hq
simp only [Submodule.Quotient.quot_mk_eq_mk, Quotient.mk_eq_mk, map_add, Quotient.lift_mk,
coe_evalβRingHom] at hp hq β’
rw [hp, hq]
Β· intro n a
simp only [β smul_X_eq_monomial, β C_mul' a (X ^ n), Quotient.lift_mk,
Submodule.Quotient.quot_mk_eq_mk, Quotient.mk_eq_mk, evalβ_X_pow, evalβ_smul,
coe_evalβRingHom, RingHom.map_pow, evalβ_C, RingHom.coe_comp, RingHom.map_mul, evalβ_X,
Function.comp_apply]
#align ideal.polynomial_quotient_equiv_quotient_polynomial Ideal.polynomialQuotientEquivQuotientPolynomial
@[simp]
| Mathlib/RingTheory/Polynomial/Quotient.lean | 150 | 154 | theorem polynomialQuotientEquivQuotientPolynomial_symm_mk (I : Ideal R) (f : R[X]) :
I.polynomialQuotientEquivQuotientPolynomial.symm (Quotient.mk _ f) = f.map (Quotient.mk I) := by |
rw [polynomialQuotientEquivQuotientPolynomial, RingEquiv.symm_mk, RingEquiv.coe_mk,
Equiv.coe_fn_mk, Quotient.lift_mk, coe_evalβRingHom, evalβ_eq_eval_map, β Polynomial.map_map,
β evalβ_eq_eval_map, Polynomial.evalβ_C_X]
| 3 | 20.085537 | 1 | 1.428571 | 7 | 1,526 |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
namespace Ideal
noncomputable section
open Polynomial
variable {R : Type*} [CommRing R]
theorem quotient_map_C_eq_zero {I : Ideal R} :
β a β I, ((Quotient.mk (map (C : R β+* R[X]) I : Ideal R[X])).comp C) a = 0 := by
intro a ha
rw [RingHom.comp_apply, Quotient.eq_zero_iff_mem]
exact mem_map_of_mem _ ha
#align ideal.quotient_map_C_eq_zero Ideal.quotient_map_C_eq_zero
theorem evalβ_C_mk_eq_zero {I : Ideal R} :
β f β (map (C : R β+* R[X]) I : Ideal R[X]), evalβRingHom (C.comp (Quotient.mk I)) X f = 0 := by
intro a ha
rw [β sum_monomial_eq a]
dsimp
rw [evalβ_sum]
refine Finset.sum_eq_zero fun n _ => ?_
dsimp
rw [evalβ_monomial (C.comp (Quotient.mk I)) X]
refine mul_eq_zero_of_left (Polynomial.ext fun m => ?_) (X ^ n)
erw [coeff_C]
by_cases h : m = 0
Β· simpa [h] using Quotient.eq_zero_iff_mem.2 ((mem_map_C_iff.1 ha) n)
Β· simp [h]
#align ideal.evalβ_C_mk_eq_zero Ideal.evalβ_C_mk_eq_zero
def polynomialQuotientEquivQuotientPolynomial (I : Ideal R) :
(R β§Έ I)[X] β+* R[X] β§Έ (map C I : Ideal R[X]) where
toFun :=
evalβRingHom
(Quotient.lift I ((Quotient.mk (map C I : Ideal R[X])).comp C) quotient_map_C_eq_zero)
(Quotient.mk (map C I : Ideal R[X]) X)
invFun :=
Quotient.lift (map C I : Ideal R[X]) (evalβRingHom (C.comp (Quotient.mk I)) X)
evalβ_C_mk_eq_zero
map_mul' f g := by simp only [coe_evalβRingHom, evalβ_mul]
map_add' f g := by simp only [evalβ_add, coe_evalβRingHom]
left_inv := by
intro f
refine Polynomial.induction_on' f ?_ ?_
Β· intro p q hp hq
simp only [coe_evalβRingHom] at hp hq
simp only [coe_evalβRingHom, hp, hq, RingHom.map_add]
Β· rintro n β¨xβ©
simp only [β smul_X_eq_monomial, C_mul', Quotient.lift_mk, Submodule.Quotient.quot_mk_eq_mk,
Quotient.mk_eq_mk, evalβ_X_pow, evalβ_smul, coe_evalβRingHom, RingHom.map_pow, evalβ_C,
RingHom.coe_comp, RingHom.map_mul, evalβ_X, Function.comp_apply]
right_inv := by
rintro β¨fβ©
refine Polynomial.induction_on' f ?_ ?_
Β· -- Porting note: was `simp_intro p q hp hq`
intros p q hp hq
simp only [Submodule.Quotient.quot_mk_eq_mk, Quotient.mk_eq_mk, map_add, Quotient.lift_mk,
coe_evalβRingHom] at hp hq β’
rw [hp, hq]
Β· intro n a
simp only [β smul_X_eq_monomial, β C_mul' a (X ^ n), Quotient.lift_mk,
Submodule.Quotient.quot_mk_eq_mk, Quotient.mk_eq_mk, evalβ_X_pow, evalβ_smul,
coe_evalβRingHom, RingHom.map_pow, evalβ_C, RingHom.coe_comp, RingHom.map_mul, evalβ_X,
Function.comp_apply]
#align ideal.polynomial_quotient_equiv_quotient_polynomial Ideal.polynomialQuotientEquivQuotientPolynomial
@[simp]
theorem polynomialQuotientEquivQuotientPolynomial_symm_mk (I : Ideal R) (f : R[X]) :
I.polynomialQuotientEquivQuotientPolynomial.symm (Quotient.mk _ f) = f.map (Quotient.mk I) := by
rw [polynomialQuotientEquivQuotientPolynomial, RingEquiv.symm_mk, RingEquiv.coe_mk,
Equiv.coe_fn_mk, Quotient.lift_mk, coe_evalβRingHom, evalβ_eq_eval_map, β Polynomial.map_map,
β evalβ_eq_eval_map, Polynomial.evalβ_C_X]
#align ideal.polynomial_quotient_equiv_quotient_polynomial_symm_mk Ideal.polynomialQuotientEquivQuotientPolynomial_symm_mk
@[simp]
| Mathlib/RingTheory/Polynomial/Quotient.lean | 158 | 162 | theorem polynomialQuotientEquivQuotientPolynomial_map_mk (I : Ideal R) (f : R[X]) :
I.polynomialQuotientEquivQuotientPolynomial (f.map <| Quotient.mk I) =
Quotient.mk (map C I : Ideal R[X]) f := by |
apply (polynomialQuotientEquivQuotientPolynomial I).symm.injective
rw [RingEquiv.symm_apply_apply, polynomialQuotientEquivQuotientPolynomial_symm_mk]
| 2 | 7.389056 | 1 | 1.428571 | 7 | 1,526 |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
namespace Ideal
noncomputable section
open Polynomial
variable {R : Type*} [CommRing R]
theorem quotient_map_C_eq_zero {I : Ideal R} :
β a β I, ((Quotient.mk (map (C : R β+* R[X]) I : Ideal R[X])).comp C) a = 0 := by
intro a ha
rw [RingHom.comp_apply, Quotient.eq_zero_iff_mem]
exact mem_map_of_mem _ ha
#align ideal.quotient_map_C_eq_zero Ideal.quotient_map_C_eq_zero
theorem evalβ_C_mk_eq_zero {I : Ideal R} :
β f β (map (C : R β+* R[X]) I : Ideal R[X]), evalβRingHom (C.comp (Quotient.mk I)) X f = 0 := by
intro a ha
rw [β sum_monomial_eq a]
dsimp
rw [evalβ_sum]
refine Finset.sum_eq_zero fun n _ => ?_
dsimp
rw [evalβ_monomial (C.comp (Quotient.mk I)) X]
refine mul_eq_zero_of_left (Polynomial.ext fun m => ?_) (X ^ n)
erw [coeff_C]
by_cases h : m = 0
Β· simpa [h] using Quotient.eq_zero_iff_mem.2 ((mem_map_C_iff.1 ha) n)
Β· simp [h]
#align ideal.evalβ_C_mk_eq_zero Ideal.evalβ_C_mk_eq_zero
def polynomialQuotientEquivQuotientPolynomial (I : Ideal R) :
(R β§Έ I)[X] β+* R[X] β§Έ (map C I : Ideal R[X]) where
toFun :=
evalβRingHom
(Quotient.lift I ((Quotient.mk (map C I : Ideal R[X])).comp C) quotient_map_C_eq_zero)
(Quotient.mk (map C I : Ideal R[X]) X)
invFun :=
Quotient.lift (map C I : Ideal R[X]) (evalβRingHom (C.comp (Quotient.mk I)) X)
evalβ_C_mk_eq_zero
map_mul' f g := by simp only [coe_evalβRingHom, evalβ_mul]
map_add' f g := by simp only [evalβ_add, coe_evalβRingHom]
left_inv := by
intro f
refine Polynomial.induction_on' f ?_ ?_
Β· intro p q hp hq
simp only [coe_evalβRingHom] at hp hq
simp only [coe_evalβRingHom, hp, hq, RingHom.map_add]
Β· rintro n β¨xβ©
simp only [β smul_X_eq_monomial, C_mul', Quotient.lift_mk, Submodule.Quotient.quot_mk_eq_mk,
Quotient.mk_eq_mk, evalβ_X_pow, evalβ_smul, coe_evalβRingHom, RingHom.map_pow, evalβ_C,
RingHom.coe_comp, RingHom.map_mul, evalβ_X, Function.comp_apply]
right_inv := by
rintro β¨fβ©
refine Polynomial.induction_on' f ?_ ?_
Β· -- Porting note: was `simp_intro p q hp hq`
intros p q hp hq
simp only [Submodule.Quotient.quot_mk_eq_mk, Quotient.mk_eq_mk, map_add, Quotient.lift_mk,
coe_evalβRingHom] at hp hq β’
rw [hp, hq]
Β· intro n a
simp only [β smul_X_eq_monomial, β C_mul' a (X ^ n), Quotient.lift_mk,
Submodule.Quotient.quot_mk_eq_mk, Quotient.mk_eq_mk, evalβ_X_pow, evalβ_smul,
coe_evalβRingHom, RingHom.map_pow, evalβ_C, RingHom.coe_comp, RingHom.map_mul, evalβ_X,
Function.comp_apply]
#align ideal.polynomial_quotient_equiv_quotient_polynomial Ideal.polynomialQuotientEquivQuotientPolynomial
@[simp]
theorem polynomialQuotientEquivQuotientPolynomial_symm_mk (I : Ideal R) (f : R[X]) :
I.polynomialQuotientEquivQuotientPolynomial.symm (Quotient.mk _ f) = f.map (Quotient.mk I) := by
rw [polynomialQuotientEquivQuotientPolynomial, RingEquiv.symm_mk, RingEquiv.coe_mk,
Equiv.coe_fn_mk, Quotient.lift_mk, coe_evalβRingHom, evalβ_eq_eval_map, β Polynomial.map_map,
β evalβ_eq_eval_map, Polynomial.evalβ_C_X]
#align ideal.polynomial_quotient_equiv_quotient_polynomial_symm_mk Ideal.polynomialQuotientEquivQuotientPolynomial_symm_mk
@[simp]
theorem polynomialQuotientEquivQuotientPolynomial_map_mk (I : Ideal R) (f : R[X]) :
I.polynomialQuotientEquivQuotientPolynomial (f.map <| Quotient.mk I) =
Quotient.mk (map C I : Ideal R[X]) f := by
apply (polynomialQuotientEquivQuotientPolynomial I).symm.injective
rw [RingEquiv.symm_apply_apply, polynomialQuotientEquivQuotientPolynomial_symm_mk]
#align ideal.polynomial_quotient_equiv_quotient_polynomial_map_mk Ideal.polynomialQuotientEquivQuotientPolynomial_map_mk
theorem isDomain_map_C_quotient {P : Ideal R} (_ : IsPrime P) :
IsDomain (R[X] β§Έ (map (C : R β+* R[X]) P : Ideal R[X])) :=
MulEquiv.isDomain (Polynomial (R β§Έ P)) (polynomialQuotientEquivQuotientPolynomial P).symm
#align ideal.is_domain_map_C_quotient Ideal.isDomain_map_C_quotient
| Mathlib/RingTheory/Polynomial/Quotient.lean | 175 | 194 | theorem eq_zero_of_polynomial_mem_map_range (I : Ideal R[X]) (x : ((Quotient.mk I).comp C).range)
(hx : C x β I.map (Polynomial.mapRingHom ((Quotient.mk I).comp C).rangeRestrict)) : x = 0 := by |
let i := ((Quotient.mk I).comp C).rangeRestrict
have hi' : RingHom.ker (Polynomial.mapRingHom i) β€ I := by
refine fun f hf => polynomial_mem_ideal_of_coeff_mem_ideal I f fun n => ?_
rw [mem_comap, β Quotient.eq_zero_iff_mem, β RingHom.comp_apply]
rw [RingHom.mem_ker, coe_mapRingHom] at hf
replace hf := congr_arg (fun f : Polynomial _ => f.coeff n) hf
simp only [coeff_map, coeff_zero] at hf
rwa [Subtype.ext_iff, RingHom.coe_rangeRestrict] at hf
obtain β¨x, hx'β© := x
obtain β¨y, rflβ© := RingHom.mem_range.1 hx'
refine Subtype.eq ?_
simp only [RingHom.comp_apply, Quotient.eq_zero_iff_mem, ZeroMemClass.coe_zero]
suffices C (i y) β I.map (Polynomial.mapRingHom i) by
obtain β¨f, hfβ© := mem_image_of_mem_map_of_surjective (Polynomial.mapRingHom i)
(Polynomial.map_surjective _ (RingHom.rangeRestrict_surjective ((Quotient.mk I).comp C))) this
refine sub_add_cancel (C y) f βΈ I.add_mem (hi' ?_ : C y - f β I) hf.1
rw [RingHom.mem_ker, RingHom.map_sub, hf.2, sub_eq_zero, coe_mapRingHom, map_C]
exact hx
| 18 | 65,659,969.137331 | 2 | 1.428571 | 7 | 1,526 |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
namespace MvPolynomial
variable {R : Type*} {Ο : Type*} [CommRing R] {r : R}
| Mathlib/RingTheory/Polynomial/Quotient.lean | 205 | 209 | theorem quotient_map_C_eq_zero {I : Ideal R} {i : R} (hi : i β I) :
(Ideal.Quotient.mk (Ideal.map (C : R β+* MvPolynomial Ο R) I :
Ideal (MvPolynomial Ο R))).comp C i = 0 := by |
simp only [Function.comp_apply, RingHom.coe_comp, Ideal.Quotient.eq_zero_iff_mem]
exact Ideal.mem_map_of_mem _ hi
| 2 | 7.389056 | 1 | 1.428571 | 7 | 1,526 |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
namespace MvPolynomial
variable {R : Type*} {Ο : Type*} [CommRing R] {r : R}
theorem quotient_map_C_eq_zero {I : Ideal R} {i : R} (hi : i β I) :
(Ideal.Quotient.mk (Ideal.map (C : R β+* MvPolynomial Ο R) I :
Ideal (MvPolynomial Ο R))).comp C i = 0 := by
simp only [Function.comp_apply, RingHom.coe_comp, Ideal.Quotient.eq_zero_iff_mem]
exact Ideal.mem_map_of_mem _ hi
#align mv_polynomial.quotient_map_C_eq_zero MvPolynomial.quotient_map_C_eq_zero
| Mathlib/RingTheory/Polynomial/Quotient.lean | 212 | 223 | theorem evalβ_C_mk_eq_zero {I : Ideal R} {a : MvPolynomial Ο R}
(ha : a β (Ideal.map (C : R β+* MvPolynomial Ο R) I : Ideal (MvPolynomial Ο R))) :
evalβHom (C.comp (Ideal.Quotient.mk I)) X a = 0 := by |
rw [as_sum a]
rw [coe_evalβHom, evalβ_sum]
refine Finset.sum_eq_zero fun n _ => ?_
simp only [evalβ_monomial, Function.comp_apply, RingHom.coe_comp]
refine mul_eq_zero_of_left ?_ _
suffices coeff n a β I by
rw [β @Ideal.mk_ker R _ I, RingHom.mem_ker] at this
simp only [this, C_0]
exact mem_map_C_iff.1 ha n
| 9 | 8,103.083928 | 2 | 1.428571 | 7 | 1,526 |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.charpoly.linear_map from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
variable {ΞΉ : Type*} [Fintype ΞΉ]
variable {M : Type*} [AddCommGroup M] (R : Type*) [CommRing R] [Module R M] (I : Ideal R)
variable (b : ΞΉ β M) (hb : Submodule.span R (Set.range b) = β€)
open Polynomial Matrix
def PiToModule.fromMatrix [DecidableEq ΞΉ] : Matrix ΞΉ ΞΉ R ββ[R] (ΞΉ β R) ββ[R] M :=
(LinearMap.llcomp R _ _ _ (Fintype.total R R b)).comp algEquivMatrix'.symm.toLinearMap
#align pi_to_module.from_matrix PiToModule.fromMatrix
theorem PiToModule.fromMatrix_apply [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (w : ΞΉ β R) :
PiToModule.fromMatrix R b A w = Fintype.total R R b (A *α΅₯ w) :=
rfl
#align pi_to_module.from_matrix_apply PiToModule.fromMatrix_apply
| Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean | 43 | 46 | theorem PiToModule.fromMatrix_apply_single_one [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (j : ΞΉ) :
PiToModule.fromMatrix R b A (Pi.single j 1) = β i : ΞΉ, A i j β’ b i := by |
rw [PiToModule.fromMatrix_apply, Fintype.total_apply, Matrix.mulVec_single]
simp_rw [mul_one]
| 2 | 7.389056 | 1 | 1.444444 | 9 | 1,527 |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.charpoly.linear_map from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
variable {ΞΉ : Type*} [Fintype ΞΉ]
variable {M : Type*} [AddCommGroup M] (R : Type*) [CommRing R] [Module R M] (I : Ideal R)
variable (b : ΞΉ β M) (hb : Submodule.span R (Set.range b) = β€)
open Polynomial Matrix
def PiToModule.fromMatrix [DecidableEq ΞΉ] : Matrix ΞΉ ΞΉ R ββ[R] (ΞΉ β R) ββ[R] M :=
(LinearMap.llcomp R _ _ _ (Fintype.total R R b)).comp algEquivMatrix'.symm.toLinearMap
#align pi_to_module.from_matrix PiToModule.fromMatrix
theorem PiToModule.fromMatrix_apply [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (w : ΞΉ β R) :
PiToModule.fromMatrix R b A w = Fintype.total R R b (A *α΅₯ w) :=
rfl
#align pi_to_module.from_matrix_apply PiToModule.fromMatrix_apply
theorem PiToModule.fromMatrix_apply_single_one [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (j : ΞΉ) :
PiToModule.fromMatrix R b A (Pi.single j 1) = β i : ΞΉ, A i j β’ b i := by
rw [PiToModule.fromMatrix_apply, Fintype.total_apply, Matrix.mulVec_single]
simp_rw [mul_one]
#align pi_to_module.from_matrix_apply_single_one PiToModule.fromMatrix_apply_single_one
def PiToModule.fromEnd : Module.End R M ββ[R] (ΞΉ β R) ββ[R] M :=
LinearMap.lcomp _ _ (Fintype.total R R b)
#align pi_to_module.from_End PiToModule.fromEnd
theorem PiToModule.fromEnd_apply (f : Module.End R M) (w : ΞΉ β R) :
PiToModule.fromEnd R b f w = f (Fintype.total R R b w) :=
rfl
#align pi_to_module.from_End_apply PiToModule.fromEnd_apply
| Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean | 60 | 65 | theorem PiToModule.fromEnd_apply_single_one [DecidableEq ΞΉ] (f : Module.End R M) (i : ΞΉ) :
PiToModule.fromEnd R b f (Pi.single i 1) = f (b i) := by |
rw [PiToModule.fromEnd_apply]
congr
convert Fintype.total_apply_single (S := R) R b i (1 : R)
rw [one_smul]
| 4 | 54.59815 | 2 | 1.444444 | 9 | 1,527 |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.charpoly.linear_map from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
variable {ΞΉ : Type*} [Fintype ΞΉ]
variable {M : Type*} [AddCommGroup M] (R : Type*) [CommRing R] [Module R M] (I : Ideal R)
variable (b : ΞΉ β M) (hb : Submodule.span R (Set.range b) = β€)
open Polynomial Matrix
def PiToModule.fromMatrix [DecidableEq ΞΉ] : Matrix ΞΉ ΞΉ R ββ[R] (ΞΉ β R) ββ[R] M :=
(LinearMap.llcomp R _ _ _ (Fintype.total R R b)).comp algEquivMatrix'.symm.toLinearMap
#align pi_to_module.from_matrix PiToModule.fromMatrix
theorem PiToModule.fromMatrix_apply [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (w : ΞΉ β R) :
PiToModule.fromMatrix R b A w = Fintype.total R R b (A *α΅₯ w) :=
rfl
#align pi_to_module.from_matrix_apply PiToModule.fromMatrix_apply
theorem PiToModule.fromMatrix_apply_single_one [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (j : ΞΉ) :
PiToModule.fromMatrix R b A (Pi.single j 1) = β i : ΞΉ, A i j β’ b i := by
rw [PiToModule.fromMatrix_apply, Fintype.total_apply, Matrix.mulVec_single]
simp_rw [mul_one]
#align pi_to_module.from_matrix_apply_single_one PiToModule.fromMatrix_apply_single_one
def PiToModule.fromEnd : Module.End R M ββ[R] (ΞΉ β R) ββ[R] M :=
LinearMap.lcomp _ _ (Fintype.total R R b)
#align pi_to_module.from_End PiToModule.fromEnd
theorem PiToModule.fromEnd_apply (f : Module.End R M) (w : ΞΉ β R) :
PiToModule.fromEnd R b f w = f (Fintype.total R R b w) :=
rfl
#align pi_to_module.from_End_apply PiToModule.fromEnd_apply
theorem PiToModule.fromEnd_apply_single_one [DecidableEq ΞΉ] (f : Module.End R M) (i : ΞΉ) :
PiToModule.fromEnd R b f (Pi.single i 1) = f (b i) := by
rw [PiToModule.fromEnd_apply]
congr
convert Fintype.total_apply_single (S := R) R b i (1 : R)
rw [one_smul]
#align pi_to_module.from_End_apply_single_one PiToModule.fromEnd_apply_single_one
| Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean | 68 | 75 | theorem PiToModule.fromEnd_injective (hb : Submodule.span R (Set.range b) = β€) :
Function.Injective (PiToModule.fromEnd R b) := by |
intro x y e
ext m
obtain β¨m, rflβ© : m β LinearMap.range (Fintype.total R R b) := by
rw [(Fintype.range_total R b).trans hb]
exact Submodule.mem_top
exact (LinearMap.congr_fun e m : _)
| 6 | 403.428793 | 2 | 1.444444 | 9 | 1,527 |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.charpoly.linear_map from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
variable {ΞΉ : Type*} [Fintype ΞΉ]
variable {M : Type*} [AddCommGroup M] (R : Type*) [CommRing R] [Module R M] (I : Ideal R)
variable (b : ΞΉ β M) (hb : Submodule.span R (Set.range b) = β€)
open Polynomial Matrix
def PiToModule.fromMatrix [DecidableEq ΞΉ] : Matrix ΞΉ ΞΉ R ββ[R] (ΞΉ β R) ββ[R] M :=
(LinearMap.llcomp R _ _ _ (Fintype.total R R b)).comp algEquivMatrix'.symm.toLinearMap
#align pi_to_module.from_matrix PiToModule.fromMatrix
theorem PiToModule.fromMatrix_apply [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (w : ΞΉ β R) :
PiToModule.fromMatrix R b A w = Fintype.total R R b (A *α΅₯ w) :=
rfl
#align pi_to_module.from_matrix_apply PiToModule.fromMatrix_apply
theorem PiToModule.fromMatrix_apply_single_one [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (j : ΞΉ) :
PiToModule.fromMatrix R b A (Pi.single j 1) = β i : ΞΉ, A i j β’ b i := by
rw [PiToModule.fromMatrix_apply, Fintype.total_apply, Matrix.mulVec_single]
simp_rw [mul_one]
#align pi_to_module.from_matrix_apply_single_one PiToModule.fromMatrix_apply_single_one
def PiToModule.fromEnd : Module.End R M ββ[R] (ΞΉ β R) ββ[R] M :=
LinearMap.lcomp _ _ (Fintype.total R R b)
#align pi_to_module.from_End PiToModule.fromEnd
theorem PiToModule.fromEnd_apply (f : Module.End R M) (w : ΞΉ β R) :
PiToModule.fromEnd R b f w = f (Fintype.total R R b w) :=
rfl
#align pi_to_module.from_End_apply PiToModule.fromEnd_apply
theorem PiToModule.fromEnd_apply_single_one [DecidableEq ΞΉ] (f : Module.End R M) (i : ΞΉ) :
PiToModule.fromEnd R b f (Pi.single i 1) = f (b i) := by
rw [PiToModule.fromEnd_apply]
congr
convert Fintype.total_apply_single (S := R) R b i (1 : R)
rw [one_smul]
#align pi_to_module.from_End_apply_single_one PiToModule.fromEnd_apply_single_one
theorem PiToModule.fromEnd_injective (hb : Submodule.span R (Set.range b) = β€) :
Function.Injective (PiToModule.fromEnd R b) := by
intro x y e
ext m
obtain β¨m, rflβ© : m β LinearMap.range (Fintype.total R R b) := by
rw [(Fintype.range_total R b).trans hb]
exact Submodule.mem_top
exact (LinearMap.congr_fun e m : _)
#align pi_to_module.from_End_injective PiToModule.fromEnd_injective
section
variable {R} [DecidableEq ΞΉ]
def Matrix.Represents (A : Matrix ΞΉ ΞΉ R) (f : Module.End R M) : Prop :=
PiToModule.fromMatrix R b A = PiToModule.fromEnd R b f
#align matrix.represents Matrix.Represents
variable {b}
theorem Matrix.Represents.congr_fun {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} (h : A.Represents b f)
(x) : Fintype.total R R b (A *α΅₯ x) = f (Fintype.total R R b x) :=
LinearMap.congr_fun h x
#align matrix.represents.congr_fun Matrix.Represents.congr_fun
theorem Matrix.represents_iff {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} :
A.Represents b f β β x, Fintype.total R R b (A *α΅₯ x) = f (Fintype.total R R b x) :=
β¨fun e x => e.congr_fun x, fun H => LinearMap.ext fun x => H xβ©
#align matrix.represents_iff Matrix.represents_iff
| Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean | 100 | 111 | theorem Matrix.represents_iff' {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} :
A.Represents b f β β j, β i : ΞΉ, A i j β’ b i = f (b j) := by |
constructor
Β· intro h i
have := LinearMap.congr_fun h (Pi.single i 1)
rwa [PiToModule.fromEnd_apply_single_one, PiToModule.fromMatrix_apply_single_one] at this
Β· intro h
-- Porting note: was `ext`
refine LinearMap.pi_ext' (fun i => LinearMap.ext_ring ?_)
simp_rw [LinearMap.comp_apply, LinearMap.coe_single, PiToModule.fromEnd_apply_single_one,
PiToModule.fromMatrix_apply_single_one]
apply h
| 10 | 22,026.465795 | 2 | 1.444444 | 9 | 1,527 |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.charpoly.linear_map from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
variable {ΞΉ : Type*} [Fintype ΞΉ]
variable {M : Type*} [AddCommGroup M] (R : Type*) [CommRing R] [Module R M] (I : Ideal R)
variable (b : ΞΉ β M) (hb : Submodule.span R (Set.range b) = β€)
open Polynomial Matrix
def PiToModule.fromMatrix [DecidableEq ΞΉ] : Matrix ΞΉ ΞΉ R ββ[R] (ΞΉ β R) ββ[R] M :=
(LinearMap.llcomp R _ _ _ (Fintype.total R R b)).comp algEquivMatrix'.symm.toLinearMap
#align pi_to_module.from_matrix PiToModule.fromMatrix
theorem PiToModule.fromMatrix_apply [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (w : ΞΉ β R) :
PiToModule.fromMatrix R b A w = Fintype.total R R b (A *α΅₯ w) :=
rfl
#align pi_to_module.from_matrix_apply PiToModule.fromMatrix_apply
theorem PiToModule.fromMatrix_apply_single_one [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (j : ΞΉ) :
PiToModule.fromMatrix R b A (Pi.single j 1) = β i : ΞΉ, A i j β’ b i := by
rw [PiToModule.fromMatrix_apply, Fintype.total_apply, Matrix.mulVec_single]
simp_rw [mul_one]
#align pi_to_module.from_matrix_apply_single_one PiToModule.fromMatrix_apply_single_one
def PiToModule.fromEnd : Module.End R M ββ[R] (ΞΉ β R) ββ[R] M :=
LinearMap.lcomp _ _ (Fintype.total R R b)
#align pi_to_module.from_End PiToModule.fromEnd
theorem PiToModule.fromEnd_apply (f : Module.End R M) (w : ΞΉ β R) :
PiToModule.fromEnd R b f w = f (Fintype.total R R b w) :=
rfl
#align pi_to_module.from_End_apply PiToModule.fromEnd_apply
theorem PiToModule.fromEnd_apply_single_one [DecidableEq ΞΉ] (f : Module.End R M) (i : ΞΉ) :
PiToModule.fromEnd R b f (Pi.single i 1) = f (b i) := by
rw [PiToModule.fromEnd_apply]
congr
convert Fintype.total_apply_single (S := R) R b i (1 : R)
rw [one_smul]
#align pi_to_module.from_End_apply_single_one PiToModule.fromEnd_apply_single_one
theorem PiToModule.fromEnd_injective (hb : Submodule.span R (Set.range b) = β€) :
Function.Injective (PiToModule.fromEnd R b) := by
intro x y e
ext m
obtain β¨m, rflβ© : m β LinearMap.range (Fintype.total R R b) := by
rw [(Fintype.range_total R b).trans hb]
exact Submodule.mem_top
exact (LinearMap.congr_fun e m : _)
#align pi_to_module.from_End_injective PiToModule.fromEnd_injective
section
variable {R} [DecidableEq ΞΉ]
def Matrix.Represents (A : Matrix ΞΉ ΞΉ R) (f : Module.End R M) : Prop :=
PiToModule.fromMatrix R b A = PiToModule.fromEnd R b f
#align matrix.represents Matrix.Represents
variable {b}
theorem Matrix.Represents.congr_fun {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} (h : A.Represents b f)
(x) : Fintype.total R R b (A *α΅₯ x) = f (Fintype.total R R b x) :=
LinearMap.congr_fun h x
#align matrix.represents.congr_fun Matrix.Represents.congr_fun
theorem Matrix.represents_iff {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} :
A.Represents b f β β x, Fintype.total R R b (A *α΅₯ x) = f (Fintype.total R R b x) :=
β¨fun e x => e.congr_fun x, fun H => LinearMap.ext fun x => H xβ©
#align matrix.represents_iff Matrix.represents_iff
theorem Matrix.represents_iff' {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} :
A.Represents b f β β j, β i : ΞΉ, A i j β’ b i = f (b j) := by
constructor
Β· intro h i
have := LinearMap.congr_fun h (Pi.single i 1)
rwa [PiToModule.fromEnd_apply_single_one, PiToModule.fromMatrix_apply_single_one] at this
Β· intro h
-- Porting note: was `ext`
refine LinearMap.pi_ext' (fun i => LinearMap.ext_ring ?_)
simp_rw [LinearMap.comp_apply, LinearMap.coe_single, PiToModule.fromEnd_apply_single_one,
PiToModule.fromMatrix_apply_single_one]
apply h
#align matrix.represents_iff' Matrix.represents_iff'
| Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean | 114 | 121 | theorem Matrix.Represents.mul {A A' : Matrix ΞΉ ΞΉ R} {f f' : Module.End R M} (h : A.Represents b f)
(h' : Matrix.Represents b A' f') : (A * A').Represents b (f * f') := by |
delta Matrix.Represents PiToModule.fromMatrix
rw [LinearMap.comp_apply, AlgEquiv.toLinearMap_apply, _root_.map_mul]
ext
dsimp [PiToModule.fromEnd]
rw [β h'.congr_fun, β h.congr_fun]
rfl
| 6 | 403.428793 | 2 | 1.444444 | 9 | 1,527 |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.charpoly.linear_map from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
variable {ΞΉ : Type*} [Fintype ΞΉ]
variable {M : Type*} [AddCommGroup M] (R : Type*) [CommRing R] [Module R M] (I : Ideal R)
variable (b : ΞΉ β M) (hb : Submodule.span R (Set.range b) = β€)
open Polynomial Matrix
def PiToModule.fromMatrix [DecidableEq ΞΉ] : Matrix ΞΉ ΞΉ R ββ[R] (ΞΉ β R) ββ[R] M :=
(LinearMap.llcomp R _ _ _ (Fintype.total R R b)).comp algEquivMatrix'.symm.toLinearMap
#align pi_to_module.from_matrix PiToModule.fromMatrix
theorem PiToModule.fromMatrix_apply [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (w : ΞΉ β R) :
PiToModule.fromMatrix R b A w = Fintype.total R R b (A *α΅₯ w) :=
rfl
#align pi_to_module.from_matrix_apply PiToModule.fromMatrix_apply
theorem PiToModule.fromMatrix_apply_single_one [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (j : ΞΉ) :
PiToModule.fromMatrix R b A (Pi.single j 1) = β i : ΞΉ, A i j β’ b i := by
rw [PiToModule.fromMatrix_apply, Fintype.total_apply, Matrix.mulVec_single]
simp_rw [mul_one]
#align pi_to_module.from_matrix_apply_single_one PiToModule.fromMatrix_apply_single_one
def PiToModule.fromEnd : Module.End R M ββ[R] (ΞΉ β R) ββ[R] M :=
LinearMap.lcomp _ _ (Fintype.total R R b)
#align pi_to_module.from_End PiToModule.fromEnd
theorem PiToModule.fromEnd_apply (f : Module.End R M) (w : ΞΉ β R) :
PiToModule.fromEnd R b f w = f (Fintype.total R R b w) :=
rfl
#align pi_to_module.from_End_apply PiToModule.fromEnd_apply
theorem PiToModule.fromEnd_apply_single_one [DecidableEq ΞΉ] (f : Module.End R M) (i : ΞΉ) :
PiToModule.fromEnd R b f (Pi.single i 1) = f (b i) := by
rw [PiToModule.fromEnd_apply]
congr
convert Fintype.total_apply_single (S := R) R b i (1 : R)
rw [one_smul]
#align pi_to_module.from_End_apply_single_one PiToModule.fromEnd_apply_single_one
theorem PiToModule.fromEnd_injective (hb : Submodule.span R (Set.range b) = β€) :
Function.Injective (PiToModule.fromEnd R b) := by
intro x y e
ext m
obtain β¨m, rflβ© : m β LinearMap.range (Fintype.total R R b) := by
rw [(Fintype.range_total R b).trans hb]
exact Submodule.mem_top
exact (LinearMap.congr_fun e m : _)
#align pi_to_module.from_End_injective PiToModule.fromEnd_injective
section
variable {R} [DecidableEq ΞΉ]
def Matrix.Represents (A : Matrix ΞΉ ΞΉ R) (f : Module.End R M) : Prop :=
PiToModule.fromMatrix R b A = PiToModule.fromEnd R b f
#align matrix.represents Matrix.Represents
variable {b}
theorem Matrix.Represents.congr_fun {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} (h : A.Represents b f)
(x) : Fintype.total R R b (A *α΅₯ x) = f (Fintype.total R R b x) :=
LinearMap.congr_fun h x
#align matrix.represents.congr_fun Matrix.Represents.congr_fun
theorem Matrix.represents_iff {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} :
A.Represents b f β β x, Fintype.total R R b (A *α΅₯ x) = f (Fintype.total R R b x) :=
β¨fun e x => e.congr_fun x, fun H => LinearMap.ext fun x => H xβ©
#align matrix.represents_iff Matrix.represents_iff
theorem Matrix.represents_iff' {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} :
A.Represents b f β β j, β i : ΞΉ, A i j β’ b i = f (b j) := by
constructor
Β· intro h i
have := LinearMap.congr_fun h (Pi.single i 1)
rwa [PiToModule.fromEnd_apply_single_one, PiToModule.fromMatrix_apply_single_one] at this
Β· intro h
-- Porting note: was `ext`
refine LinearMap.pi_ext' (fun i => LinearMap.ext_ring ?_)
simp_rw [LinearMap.comp_apply, LinearMap.coe_single, PiToModule.fromEnd_apply_single_one,
PiToModule.fromMatrix_apply_single_one]
apply h
#align matrix.represents_iff' Matrix.represents_iff'
theorem Matrix.Represents.mul {A A' : Matrix ΞΉ ΞΉ R} {f f' : Module.End R M} (h : A.Represents b f)
(h' : Matrix.Represents b A' f') : (A * A').Represents b (f * f') := by
delta Matrix.Represents PiToModule.fromMatrix
rw [LinearMap.comp_apply, AlgEquiv.toLinearMap_apply, _root_.map_mul]
ext
dsimp [PiToModule.fromEnd]
rw [β h'.congr_fun, β h.congr_fun]
rfl
#align matrix.represents.mul Matrix.Represents.mul
| Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean | 124 | 128 | theorem Matrix.Represents.one : (1 : Matrix ΞΉ ΞΉ R).Represents b 1 := by |
delta Matrix.Represents PiToModule.fromMatrix
rw [LinearMap.comp_apply, AlgEquiv.toLinearMap_apply, _root_.map_one]
ext
rfl
| 4 | 54.59815 | 2 | 1.444444 | 9 | 1,527 |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.charpoly.linear_map from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
variable {ΞΉ : Type*} [Fintype ΞΉ]
variable {M : Type*} [AddCommGroup M] (R : Type*) [CommRing R] [Module R M] (I : Ideal R)
variable (b : ΞΉ β M) (hb : Submodule.span R (Set.range b) = β€)
open Polynomial Matrix
def PiToModule.fromMatrix [DecidableEq ΞΉ] : Matrix ΞΉ ΞΉ R ββ[R] (ΞΉ β R) ββ[R] M :=
(LinearMap.llcomp R _ _ _ (Fintype.total R R b)).comp algEquivMatrix'.symm.toLinearMap
#align pi_to_module.from_matrix PiToModule.fromMatrix
theorem PiToModule.fromMatrix_apply [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (w : ΞΉ β R) :
PiToModule.fromMatrix R b A w = Fintype.total R R b (A *α΅₯ w) :=
rfl
#align pi_to_module.from_matrix_apply PiToModule.fromMatrix_apply
theorem PiToModule.fromMatrix_apply_single_one [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (j : ΞΉ) :
PiToModule.fromMatrix R b A (Pi.single j 1) = β i : ΞΉ, A i j β’ b i := by
rw [PiToModule.fromMatrix_apply, Fintype.total_apply, Matrix.mulVec_single]
simp_rw [mul_one]
#align pi_to_module.from_matrix_apply_single_one PiToModule.fromMatrix_apply_single_one
def PiToModule.fromEnd : Module.End R M ββ[R] (ΞΉ β R) ββ[R] M :=
LinearMap.lcomp _ _ (Fintype.total R R b)
#align pi_to_module.from_End PiToModule.fromEnd
theorem PiToModule.fromEnd_apply (f : Module.End R M) (w : ΞΉ β R) :
PiToModule.fromEnd R b f w = f (Fintype.total R R b w) :=
rfl
#align pi_to_module.from_End_apply PiToModule.fromEnd_apply
theorem PiToModule.fromEnd_apply_single_one [DecidableEq ΞΉ] (f : Module.End R M) (i : ΞΉ) :
PiToModule.fromEnd R b f (Pi.single i 1) = f (b i) := by
rw [PiToModule.fromEnd_apply]
congr
convert Fintype.total_apply_single (S := R) R b i (1 : R)
rw [one_smul]
#align pi_to_module.from_End_apply_single_one PiToModule.fromEnd_apply_single_one
theorem PiToModule.fromEnd_injective (hb : Submodule.span R (Set.range b) = β€) :
Function.Injective (PiToModule.fromEnd R b) := by
intro x y e
ext m
obtain β¨m, rflβ© : m β LinearMap.range (Fintype.total R R b) := by
rw [(Fintype.range_total R b).trans hb]
exact Submodule.mem_top
exact (LinearMap.congr_fun e m : _)
#align pi_to_module.from_End_injective PiToModule.fromEnd_injective
section
variable {R} [DecidableEq ΞΉ]
def Matrix.Represents (A : Matrix ΞΉ ΞΉ R) (f : Module.End R M) : Prop :=
PiToModule.fromMatrix R b A = PiToModule.fromEnd R b f
#align matrix.represents Matrix.Represents
variable {b}
theorem Matrix.Represents.congr_fun {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} (h : A.Represents b f)
(x) : Fintype.total R R b (A *α΅₯ x) = f (Fintype.total R R b x) :=
LinearMap.congr_fun h x
#align matrix.represents.congr_fun Matrix.Represents.congr_fun
theorem Matrix.represents_iff {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} :
A.Represents b f β β x, Fintype.total R R b (A *α΅₯ x) = f (Fintype.total R R b x) :=
β¨fun e x => e.congr_fun x, fun H => LinearMap.ext fun x => H xβ©
#align matrix.represents_iff Matrix.represents_iff
theorem Matrix.represents_iff' {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} :
A.Represents b f β β j, β i : ΞΉ, A i j β’ b i = f (b j) := by
constructor
Β· intro h i
have := LinearMap.congr_fun h (Pi.single i 1)
rwa [PiToModule.fromEnd_apply_single_one, PiToModule.fromMatrix_apply_single_one] at this
Β· intro h
-- Porting note: was `ext`
refine LinearMap.pi_ext' (fun i => LinearMap.ext_ring ?_)
simp_rw [LinearMap.comp_apply, LinearMap.coe_single, PiToModule.fromEnd_apply_single_one,
PiToModule.fromMatrix_apply_single_one]
apply h
#align matrix.represents_iff' Matrix.represents_iff'
theorem Matrix.Represents.mul {A A' : Matrix ΞΉ ΞΉ R} {f f' : Module.End R M} (h : A.Represents b f)
(h' : Matrix.Represents b A' f') : (A * A').Represents b (f * f') := by
delta Matrix.Represents PiToModule.fromMatrix
rw [LinearMap.comp_apply, AlgEquiv.toLinearMap_apply, _root_.map_mul]
ext
dsimp [PiToModule.fromEnd]
rw [β h'.congr_fun, β h.congr_fun]
rfl
#align matrix.represents.mul Matrix.Represents.mul
theorem Matrix.Represents.one : (1 : Matrix ΞΉ ΞΉ R).Represents b 1 := by
delta Matrix.Represents PiToModule.fromMatrix
rw [LinearMap.comp_apply, AlgEquiv.toLinearMap_apply, _root_.map_one]
ext
rfl
#align matrix.represents.one Matrix.Represents.one
| Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean | 131 | 133 | theorem Matrix.Represents.add {A A' : Matrix ΞΉ ΞΉ R} {f f' : Module.End R M} (h : A.Represents b f)
(h' : Matrix.Represents b A' f') : (A + A').Represents b (f + f') := by |
delta Matrix.Represents at h h' β’; rw [map_add, map_add, h, h']
| 1 | 2.718282 | 0 | 1.444444 | 9 | 1,527 |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.charpoly.linear_map from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
variable {ΞΉ : Type*} [Fintype ΞΉ]
variable {M : Type*} [AddCommGroup M] (R : Type*) [CommRing R] [Module R M] (I : Ideal R)
variable (b : ΞΉ β M) (hb : Submodule.span R (Set.range b) = β€)
open Polynomial Matrix
def PiToModule.fromMatrix [DecidableEq ΞΉ] : Matrix ΞΉ ΞΉ R ββ[R] (ΞΉ β R) ββ[R] M :=
(LinearMap.llcomp R _ _ _ (Fintype.total R R b)).comp algEquivMatrix'.symm.toLinearMap
#align pi_to_module.from_matrix PiToModule.fromMatrix
theorem PiToModule.fromMatrix_apply [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (w : ΞΉ β R) :
PiToModule.fromMatrix R b A w = Fintype.total R R b (A *α΅₯ w) :=
rfl
#align pi_to_module.from_matrix_apply PiToModule.fromMatrix_apply
theorem PiToModule.fromMatrix_apply_single_one [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (j : ΞΉ) :
PiToModule.fromMatrix R b A (Pi.single j 1) = β i : ΞΉ, A i j β’ b i := by
rw [PiToModule.fromMatrix_apply, Fintype.total_apply, Matrix.mulVec_single]
simp_rw [mul_one]
#align pi_to_module.from_matrix_apply_single_one PiToModule.fromMatrix_apply_single_one
def PiToModule.fromEnd : Module.End R M ββ[R] (ΞΉ β R) ββ[R] M :=
LinearMap.lcomp _ _ (Fintype.total R R b)
#align pi_to_module.from_End PiToModule.fromEnd
theorem PiToModule.fromEnd_apply (f : Module.End R M) (w : ΞΉ β R) :
PiToModule.fromEnd R b f w = f (Fintype.total R R b w) :=
rfl
#align pi_to_module.from_End_apply PiToModule.fromEnd_apply
theorem PiToModule.fromEnd_apply_single_one [DecidableEq ΞΉ] (f : Module.End R M) (i : ΞΉ) :
PiToModule.fromEnd R b f (Pi.single i 1) = f (b i) := by
rw [PiToModule.fromEnd_apply]
congr
convert Fintype.total_apply_single (S := R) R b i (1 : R)
rw [one_smul]
#align pi_to_module.from_End_apply_single_one PiToModule.fromEnd_apply_single_one
theorem PiToModule.fromEnd_injective (hb : Submodule.span R (Set.range b) = β€) :
Function.Injective (PiToModule.fromEnd R b) := by
intro x y e
ext m
obtain β¨m, rflβ© : m β LinearMap.range (Fintype.total R R b) := by
rw [(Fintype.range_total R b).trans hb]
exact Submodule.mem_top
exact (LinearMap.congr_fun e m : _)
#align pi_to_module.from_End_injective PiToModule.fromEnd_injective
section
variable {R} [DecidableEq ΞΉ]
def Matrix.Represents (A : Matrix ΞΉ ΞΉ R) (f : Module.End R M) : Prop :=
PiToModule.fromMatrix R b A = PiToModule.fromEnd R b f
#align matrix.represents Matrix.Represents
variable {b}
theorem Matrix.Represents.congr_fun {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} (h : A.Represents b f)
(x) : Fintype.total R R b (A *α΅₯ x) = f (Fintype.total R R b x) :=
LinearMap.congr_fun h x
#align matrix.represents.congr_fun Matrix.Represents.congr_fun
theorem Matrix.represents_iff {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} :
A.Represents b f β β x, Fintype.total R R b (A *α΅₯ x) = f (Fintype.total R R b x) :=
β¨fun e x => e.congr_fun x, fun H => LinearMap.ext fun x => H xβ©
#align matrix.represents_iff Matrix.represents_iff
theorem Matrix.represents_iff' {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} :
A.Represents b f β β j, β i : ΞΉ, A i j β’ b i = f (b j) := by
constructor
Β· intro h i
have := LinearMap.congr_fun h (Pi.single i 1)
rwa [PiToModule.fromEnd_apply_single_one, PiToModule.fromMatrix_apply_single_one] at this
Β· intro h
-- Porting note: was `ext`
refine LinearMap.pi_ext' (fun i => LinearMap.ext_ring ?_)
simp_rw [LinearMap.comp_apply, LinearMap.coe_single, PiToModule.fromEnd_apply_single_one,
PiToModule.fromMatrix_apply_single_one]
apply h
#align matrix.represents_iff' Matrix.represents_iff'
theorem Matrix.Represents.mul {A A' : Matrix ΞΉ ΞΉ R} {f f' : Module.End R M} (h : A.Represents b f)
(h' : Matrix.Represents b A' f') : (A * A').Represents b (f * f') := by
delta Matrix.Represents PiToModule.fromMatrix
rw [LinearMap.comp_apply, AlgEquiv.toLinearMap_apply, _root_.map_mul]
ext
dsimp [PiToModule.fromEnd]
rw [β h'.congr_fun, β h.congr_fun]
rfl
#align matrix.represents.mul Matrix.Represents.mul
theorem Matrix.Represents.one : (1 : Matrix ΞΉ ΞΉ R).Represents b 1 := by
delta Matrix.Represents PiToModule.fromMatrix
rw [LinearMap.comp_apply, AlgEquiv.toLinearMap_apply, _root_.map_one]
ext
rfl
#align matrix.represents.one Matrix.Represents.one
theorem Matrix.Represents.add {A A' : Matrix ΞΉ ΞΉ R} {f f' : Module.End R M} (h : A.Represents b f)
(h' : Matrix.Represents b A' f') : (A + A').Represents b (f + f') := by
delta Matrix.Represents at h h' β’; rw [map_add, map_add, h, h']
#align matrix.represents.add Matrix.Represents.add
| Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean | 136 | 138 | theorem Matrix.Represents.zero : (0 : Matrix ΞΉ ΞΉ R).Represents b 0 := by |
delta Matrix.Represents
rw [map_zero, map_zero]
| 2 | 7.389056 | 1 | 1.444444 | 9 | 1,527 |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.charpoly.linear_map from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
variable {ΞΉ : Type*} [Fintype ΞΉ]
variable {M : Type*} [AddCommGroup M] (R : Type*) [CommRing R] [Module R M] (I : Ideal R)
variable (b : ΞΉ β M) (hb : Submodule.span R (Set.range b) = β€)
open Polynomial Matrix
def PiToModule.fromMatrix [DecidableEq ΞΉ] : Matrix ΞΉ ΞΉ R ββ[R] (ΞΉ β R) ββ[R] M :=
(LinearMap.llcomp R _ _ _ (Fintype.total R R b)).comp algEquivMatrix'.symm.toLinearMap
#align pi_to_module.from_matrix PiToModule.fromMatrix
theorem PiToModule.fromMatrix_apply [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (w : ΞΉ β R) :
PiToModule.fromMatrix R b A w = Fintype.total R R b (A *α΅₯ w) :=
rfl
#align pi_to_module.from_matrix_apply PiToModule.fromMatrix_apply
theorem PiToModule.fromMatrix_apply_single_one [DecidableEq ΞΉ] (A : Matrix ΞΉ ΞΉ R) (j : ΞΉ) :
PiToModule.fromMatrix R b A (Pi.single j 1) = β i : ΞΉ, A i j β’ b i := by
rw [PiToModule.fromMatrix_apply, Fintype.total_apply, Matrix.mulVec_single]
simp_rw [mul_one]
#align pi_to_module.from_matrix_apply_single_one PiToModule.fromMatrix_apply_single_one
def PiToModule.fromEnd : Module.End R M ββ[R] (ΞΉ β R) ββ[R] M :=
LinearMap.lcomp _ _ (Fintype.total R R b)
#align pi_to_module.from_End PiToModule.fromEnd
theorem PiToModule.fromEnd_apply (f : Module.End R M) (w : ΞΉ β R) :
PiToModule.fromEnd R b f w = f (Fintype.total R R b w) :=
rfl
#align pi_to_module.from_End_apply PiToModule.fromEnd_apply
theorem PiToModule.fromEnd_apply_single_one [DecidableEq ΞΉ] (f : Module.End R M) (i : ΞΉ) :
PiToModule.fromEnd R b f (Pi.single i 1) = f (b i) := by
rw [PiToModule.fromEnd_apply]
congr
convert Fintype.total_apply_single (S := R) R b i (1 : R)
rw [one_smul]
#align pi_to_module.from_End_apply_single_one PiToModule.fromEnd_apply_single_one
theorem PiToModule.fromEnd_injective (hb : Submodule.span R (Set.range b) = β€) :
Function.Injective (PiToModule.fromEnd R b) := by
intro x y e
ext m
obtain β¨m, rflβ© : m β LinearMap.range (Fintype.total R R b) := by
rw [(Fintype.range_total R b).trans hb]
exact Submodule.mem_top
exact (LinearMap.congr_fun e m : _)
#align pi_to_module.from_End_injective PiToModule.fromEnd_injective
section
variable {R} [DecidableEq ΞΉ]
def Matrix.Represents (A : Matrix ΞΉ ΞΉ R) (f : Module.End R M) : Prop :=
PiToModule.fromMatrix R b A = PiToModule.fromEnd R b f
#align matrix.represents Matrix.Represents
variable {b}
theorem Matrix.Represents.congr_fun {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} (h : A.Represents b f)
(x) : Fintype.total R R b (A *α΅₯ x) = f (Fintype.total R R b x) :=
LinearMap.congr_fun h x
#align matrix.represents.congr_fun Matrix.Represents.congr_fun
theorem Matrix.represents_iff {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} :
A.Represents b f β β x, Fintype.total R R b (A *α΅₯ x) = f (Fintype.total R R b x) :=
β¨fun e x => e.congr_fun x, fun H => LinearMap.ext fun x => H xβ©
#align matrix.represents_iff Matrix.represents_iff
theorem Matrix.represents_iff' {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} :
A.Represents b f β β j, β i : ΞΉ, A i j β’ b i = f (b j) := by
constructor
Β· intro h i
have := LinearMap.congr_fun h (Pi.single i 1)
rwa [PiToModule.fromEnd_apply_single_one, PiToModule.fromMatrix_apply_single_one] at this
Β· intro h
-- Porting note: was `ext`
refine LinearMap.pi_ext' (fun i => LinearMap.ext_ring ?_)
simp_rw [LinearMap.comp_apply, LinearMap.coe_single, PiToModule.fromEnd_apply_single_one,
PiToModule.fromMatrix_apply_single_one]
apply h
#align matrix.represents_iff' Matrix.represents_iff'
theorem Matrix.Represents.mul {A A' : Matrix ΞΉ ΞΉ R} {f f' : Module.End R M} (h : A.Represents b f)
(h' : Matrix.Represents b A' f') : (A * A').Represents b (f * f') := by
delta Matrix.Represents PiToModule.fromMatrix
rw [LinearMap.comp_apply, AlgEquiv.toLinearMap_apply, _root_.map_mul]
ext
dsimp [PiToModule.fromEnd]
rw [β h'.congr_fun, β h.congr_fun]
rfl
#align matrix.represents.mul Matrix.Represents.mul
theorem Matrix.Represents.one : (1 : Matrix ΞΉ ΞΉ R).Represents b 1 := by
delta Matrix.Represents PiToModule.fromMatrix
rw [LinearMap.comp_apply, AlgEquiv.toLinearMap_apply, _root_.map_one]
ext
rfl
#align matrix.represents.one Matrix.Represents.one
theorem Matrix.Represents.add {A A' : Matrix ΞΉ ΞΉ R} {f f' : Module.End R M} (h : A.Represents b f)
(h' : Matrix.Represents b A' f') : (A + A').Represents b (f + f') := by
delta Matrix.Represents at h h' β’; rw [map_add, map_add, h, h']
#align matrix.represents.add Matrix.Represents.add
theorem Matrix.Represents.zero : (0 : Matrix ΞΉ ΞΉ R).Represents b 0 := by
delta Matrix.Represents
rw [map_zero, map_zero]
#align matrix.represents.zero Matrix.Represents.zero
| Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean | 141 | 144 | theorem Matrix.Represents.smul {A : Matrix ΞΉ ΞΉ R} {f : Module.End R M} (h : A.Represents b f)
(r : R) : (r β’ A).Represents b (r β’ f) := by |
delta Matrix.Represents at h β’
rw [_root_.map_smul, _root_.map_smul, h]
| 2 | 7.389056 | 1 | 1.444444 | 9 | 1,527 |
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce"
open Set Filter MeasureTheory MeasurableSpace
open scoped Classical Topology NNReal ENNReal MeasureTheory
universe u v w x y
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {ΞΉ : Sort y} {s t u : Set Ξ±}
namespace Real
theorem borel_eq_generateFrom_Ioo_rat :
borel β = .generateFrom (β (a : β) (b : β) (_ : a < b), {Ioo (a : β) (b : β)}) :=
isTopologicalBasis_Ioo_rat.borel_eq_generateFrom
#align real.borel_eq_generate_from_Ioo_rat Real.borel_eq_generateFrom_Ioo_rat
| Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean | 44 | 54 | theorem borel_eq_generateFrom_Iio_rat : borel β = .generateFrom (β a : β, {Iio (a : β)}) := by |
rw [borel_eq_generateFrom_Iio]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsLUB (range ((β) : β β β) β© Iio a) a := by
simp [isLUB_iff_le_iff, mem_upperBounds, β le_iff_forall_rat_lt_imp_le]
rw [β this.biUnion_Iio_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Iio (b : β)) (by simp)
| 10 | 22,026.465795 | 2 | 1.444444 | 9 | 1,528 |
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce"
open Set Filter MeasureTheory MeasurableSpace
open scoped Classical Topology NNReal ENNReal MeasureTheory
universe u v w x y
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {ΞΉ : Sort y} {s t u : Set Ξ±}
namespace Real
theorem borel_eq_generateFrom_Ioo_rat :
borel β = .generateFrom (β (a : β) (b : β) (_ : a < b), {Ioo (a : β) (b : β)}) :=
isTopologicalBasis_Ioo_rat.borel_eq_generateFrom
#align real.borel_eq_generate_from_Ioo_rat Real.borel_eq_generateFrom_Ioo_rat
theorem borel_eq_generateFrom_Iio_rat : borel β = .generateFrom (β a : β, {Iio (a : β)}) := by
rw [borel_eq_generateFrom_Iio]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsLUB (range ((β) : β β β) β© Iio a) a := by
simp [isLUB_iff_le_iff, mem_upperBounds, β le_iff_forall_rat_lt_imp_le]
rw [β this.biUnion_Iio_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Iio (b : β)) (by simp)
| Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean | 56 | 66 | theorem borel_eq_generateFrom_Ioi_rat : borel β = .generateFrom (β a : β, {Ioi (a : β)}) := by |
rw [borel_eq_generateFrom_Ioi]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsGLB (range ((β) : β β β) β© Ioi a) a := by
simp [isGLB_iff_le_iff, mem_lowerBounds, β le_iff_forall_lt_rat_imp_le]
rw [β this.biUnion_Ioi_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Ioi (b : β)) (by simp)
| 10 | 22,026.465795 | 2 | 1.444444 | 9 | 1,528 |
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce"
open Set Filter MeasureTheory MeasurableSpace
open scoped Classical Topology NNReal ENNReal MeasureTheory
universe u v w x y
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {ΞΉ : Sort y} {s t u : Set Ξ±}
namespace Real
theorem borel_eq_generateFrom_Ioo_rat :
borel β = .generateFrom (β (a : β) (b : β) (_ : a < b), {Ioo (a : β) (b : β)}) :=
isTopologicalBasis_Ioo_rat.borel_eq_generateFrom
#align real.borel_eq_generate_from_Ioo_rat Real.borel_eq_generateFrom_Ioo_rat
theorem borel_eq_generateFrom_Iio_rat : borel β = .generateFrom (β a : β, {Iio (a : β)}) := by
rw [borel_eq_generateFrom_Iio]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsLUB (range ((β) : β β β) β© Iio a) a := by
simp [isLUB_iff_le_iff, mem_upperBounds, β le_iff_forall_rat_lt_imp_le]
rw [β this.biUnion_Iio_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Iio (b : β)) (by simp)
theorem borel_eq_generateFrom_Ioi_rat : borel β = .generateFrom (β a : β, {Ioi (a : β)}) := by
rw [borel_eq_generateFrom_Ioi]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsGLB (range ((β) : β β β) β© Ioi a) a := by
simp [isGLB_iff_le_iff, mem_lowerBounds, β le_iff_forall_lt_rat_imp_le]
rw [β this.biUnion_Ioi_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Ioi (b : β)) (by simp)
| Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean | 68 | 74 | theorem borel_eq_generateFrom_Iic_rat : borel β = .generateFrom (β a : β, {Iic (a : β)}) := by |
rw [borel_eq_generateFrom_Ioi_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range]
refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;>
rintro _ β¨q, rflβ© <;>
dsimp only <;>
[rw [β compl_Iic]; rw [β compl_Ioi]] <;>
exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
| 6 | 403.428793 | 2 | 1.444444 | 9 | 1,528 |
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce"
open Set Filter MeasureTheory MeasurableSpace
open scoped Classical Topology NNReal ENNReal MeasureTheory
universe u v w x y
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {ΞΉ : Sort y} {s t u : Set Ξ±}
namespace Real
theorem borel_eq_generateFrom_Ioo_rat :
borel β = .generateFrom (β (a : β) (b : β) (_ : a < b), {Ioo (a : β) (b : β)}) :=
isTopologicalBasis_Ioo_rat.borel_eq_generateFrom
#align real.borel_eq_generate_from_Ioo_rat Real.borel_eq_generateFrom_Ioo_rat
theorem borel_eq_generateFrom_Iio_rat : borel β = .generateFrom (β a : β, {Iio (a : β)}) := by
rw [borel_eq_generateFrom_Iio]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsLUB (range ((β) : β β β) β© Iio a) a := by
simp [isLUB_iff_le_iff, mem_upperBounds, β le_iff_forall_rat_lt_imp_le]
rw [β this.biUnion_Iio_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Iio (b : β)) (by simp)
theorem borel_eq_generateFrom_Ioi_rat : borel β = .generateFrom (β a : β, {Ioi (a : β)}) := by
rw [borel_eq_generateFrom_Ioi]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsGLB (range ((β) : β β β) β© Ioi a) a := by
simp [isGLB_iff_le_iff, mem_lowerBounds, β le_iff_forall_lt_rat_imp_le]
rw [β this.biUnion_Ioi_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Ioi (b : β)) (by simp)
theorem borel_eq_generateFrom_Iic_rat : borel β = .generateFrom (β a : β, {Iic (a : β)}) := by
rw [borel_eq_generateFrom_Ioi_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range]
refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;>
rintro _ β¨q, rflβ© <;>
dsimp only <;>
[rw [β compl_Iic]; rw [β compl_Ioi]] <;>
exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
| Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean | 76 | 82 | theorem borel_eq_generateFrom_Ici_rat : borel β = .generateFrom (β a : β, {Ici (a : β)}) := by |
rw [borel_eq_generateFrom_Iio_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range]
refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;>
rintro _ β¨q, rflβ© <;>
dsimp only <;>
[rw [β compl_Ici]; rw [β compl_Iio]] <;>
exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
| 6 | 403.428793 | 2 | 1.444444 | 9 | 1,528 |
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce"
open Set Filter MeasureTheory MeasurableSpace
open scoped Classical Topology NNReal ENNReal MeasureTheory
universe u v w x y
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {ΞΉ : Sort y} {s t u : Set Ξ±}
namespace Real
theorem borel_eq_generateFrom_Ioo_rat :
borel β = .generateFrom (β (a : β) (b : β) (_ : a < b), {Ioo (a : β) (b : β)}) :=
isTopologicalBasis_Ioo_rat.borel_eq_generateFrom
#align real.borel_eq_generate_from_Ioo_rat Real.borel_eq_generateFrom_Ioo_rat
theorem borel_eq_generateFrom_Iio_rat : borel β = .generateFrom (β a : β, {Iio (a : β)}) := by
rw [borel_eq_generateFrom_Iio]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsLUB (range ((β) : β β β) β© Iio a) a := by
simp [isLUB_iff_le_iff, mem_upperBounds, β le_iff_forall_rat_lt_imp_le]
rw [β this.biUnion_Iio_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Iio (b : β)) (by simp)
theorem borel_eq_generateFrom_Ioi_rat : borel β = .generateFrom (β a : β, {Ioi (a : β)}) := by
rw [borel_eq_generateFrom_Ioi]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsGLB (range ((β) : β β β) β© Ioi a) a := by
simp [isGLB_iff_le_iff, mem_lowerBounds, β le_iff_forall_lt_rat_imp_le]
rw [β this.biUnion_Ioi_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Ioi (b : β)) (by simp)
theorem borel_eq_generateFrom_Iic_rat : borel β = .generateFrom (β a : β, {Iic (a : β)}) := by
rw [borel_eq_generateFrom_Ioi_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range]
refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;>
rintro _ β¨q, rflβ© <;>
dsimp only <;>
[rw [β compl_Iic]; rw [β compl_Ioi]] <;>
exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
theorem borel_eq_generateFrom_Ici_rat : borel β = .generateFrom (β a : β, {Ici (a : β)}) := by
rw [borel_eq_generateFrom_Iio_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range]
refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;>
rintro _ β¨q, rflβ© <;>
dsimp only <;>
[rw [β compl_Ici]; rw [β compl_Iio]] <;>
exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
| Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean | 84 | 88 | theorem isPiSystem_Ioo_rat :
IsPiSystem (β (a : β) (b : β) (_ : a < b), {Ioo (a : β) (b : β)}) := by |
convert isPiSystem_Ioo ((β) : β β β) ((β) : β β β)
ext x
simp [eq_comm]
| 3 | 20.085537 | 1 | 1.444444 | 9 | 1,528 |
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce"
open Set Filter MeasureTheory MeasurableSpace
open scoped Classical Topology NNReal ENNReal MeasureTheory
universe u v w x y
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {ΞΉ : Sort y} {s t u : Set Ξ±}
namespace Real
theorem borel_eq_generateFrom_Ioo_rat :
borel β = .generateFrom (β (a : β) (b : β) (_ : a < b), {Ioo (a : β) (b : β)}) :=
isTopologicalBasis_Ioo_rat.borel_eq_generateFrom
#align real.borel_eq_generate_from_Ioo_rat Real.borel_eq_generateFrom_Ioo_rat
theorem borel_eq_generateFrom_Iio_rat : borel β = .generateFrom (β a : β, {Iio (a : β)}) := by
rw [borel_eq_generateFrom_Iio]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsLUB (range ((β) : β β β) β© Iio a) a := by
simp [isLUB_iff_le_iff, mem_upperBounds, β le_iff_forall_rat_lt_imp_le]
rw [β this.biUnion_Iio_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Iio (b : β)) (by simp)
theorem borel_eq_generateFrom_Ioi_rat : borel β = .generateFrom (β a : β, {Ioi (a : β)}) := by
rw [borel_eq_generateFrom_Ioi]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsGLB (range ((β) : β β β) β© Ioi a) a := by
simp [isGLB_iff_le_iff, mem_lowerBounds, β le_iff_forall_lt_rat_imp_le]
rw [β this.biUnion_Ioi_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Ioi (b : β)) (by simp)
theorem borel_eq_generateFrom_Iic_rat : borel β = .generateFrom (β a : β, {Iic (a : β)}) := by
rw [borel_eq_generateFrom_Ioi_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range]
refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;>
rintro _ β¨q, rflβ© <;>
dsimp only <;>
[rw [β compl_Iic]; rw [β compl_Ioi]] <;>
exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
theorem borel_eq_generateFrom_Ici_rat : borel β = .generateFrom (β a : β, {Ici (a : β)}) := by
rw [borel_eq_generateFrom_Iio_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range]
refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;>
rintro _ β¨q, rflβ© <;>
dsimp only <;>
[rw [β compl_Ici]; rw [β compl_Iio]] <;>
exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
theorem isPiSystem_Ioo_rat :
IsPiSystem (β (a : β) (b : β) (_ : a < b), {Ioo (a : β) (b : β)}) := by
convert isPiSystem_Ioo ((β) : β β β) ((β) : β β β)
ext x
simp [eq_comm]
#align real.is_pi_system_Ioo_rat Real.isPiSystem_Ioo_rat
| Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean | 91 | 94 | theorem isPiSystem_Iio_rat : IsPiSystem (β a : β, {Iio (a : β)}) := by |
convert isPiSystem_image_Iio (((β) : β β β) '' univ)
ext x
simp only [iUnion_singleton_eq_range, mem_range, image_univ, mem_image, exists_exists_eq_and]
| 3 | 20.085537 | 1 | 1.444444 | 9 | 1,528 |
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce"
open Set Filter MeasureTheory MeasurableSpace
open scoped Classical Topology NNReal ENNReal MeasureTheory
universe u v w x y
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {ΞΉ : Sort y} {s t u : Set Ξ±}
namespace Real
theorem borel_eq_generateFrom_Ioo_rat :
borel β = .generateFrom (β (a : β) (b : β) (_ : a < b), {Ioo (a : β) (b : β)}) :=
isTopologicalBasis_Ioo_rat.borel_eq_generateFrom
#align real.borel_eq_generate_from_Ioo_rat Real.borel_eq_generateFrom_Ioo_rat
theorem borel_eq_generateFrom_Iio_rat : borel β = .generateFrom (β a : β, {Iio (a : β)}) := by
rw [borel_eq_generateFrom_Iio]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsLUB (range ((β) : β β β) β© Iio a) a := by
simp [isLUB_iff_le_iff, mem_upperBounds, β le_iff_forall_rat_lt_imp_le]
rw [β this.biUnion_Iio_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Iio (b : β)) (by simp)
theorem borel_eq_generateFrom_Ioi_rat : borel β = .generateFrom (β a : β, {Ioi (a : β)}) := by
rw [borel_eq_generateFrom_Ioi]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsGLB (range ((β) : β β β) β© Ioi a) a := by
simp [isGLB_iff_le_iff, mem_lowerBounds, β le_iff_forall_lt_rat_imp_le]
rw [β this.biUnion_Ioi_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Ioi (b : β)) (by simp)
theorem borel_eq_generateFrom_Iic_rat : borel β = .generateFrom (β a : β, {Iic (a : β)}) := by
rw [borel_eq_generateFrom_Ioi_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range]
refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;>
rintro _ β¨q, rflβ© <;>
dsimp only <;>
[rw [β compl_Iic]; rw [β compl_Ioi]] <;>
exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
theorem borel_eq_generateFrom_Ici_rat : borel β = .generateFrom (β a : β, {Ici (a : β)}) := by
rw [borel_eq_generateFrom_Iio_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range]
refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;>
rintro _ β¨q, rflβ© <;>
dsimp only <;>
[rw [β compl_Ici]; rw [β compl_Iio]] <;>
exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
theorem isPiSystem_Ioo_rat :
IsPiSystem (β (a : β) (b : β) (_ : a < b), {Ioo (a : β) (b : β)}) := by
convert isPiSystem_Ioo ((β) : β β β) ((β) : β β β)
ext x
simp [eq_comm]
#align real.is_pi_system_Ioo_rat Real.isPiSystem_Ioo_rat
theorem isPiSystem_Iio_rat : IsPiSystem (β a : β, {Iio (a : β)}) := by
convert isPiSystem_image_Iio (((β) : β β β) '' univ)
ext x
simp only [iUnion_singleton_eq_range, mem_range, image_univ, mem_image, exists_exists_eq_and]
| Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean | 96 | 99 | theorem isPiSystem_Ioi_rat : IsPiSystem (β a : β, {Ioi (a : β)}) := by |
convert isPiSystem_image_Ioi (((β) : β β β) '' univ)
ext x
simp only [iUnion_singleton_eq_range, mem_range, image_univ, mem_image, exists_exists_eq_and]
| 3 | 20.085537 | 1 | 1.444444 | 9 | 1,528 |
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce"
open Set Filter MeasureTheory MeasurableSpace
open scoped Classical Topology NNReal ENNReal MeasureTheory
universe u v w x y
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {ΞΉ : Sort y} {s t u : Set Ξ±}
namespace Real
theorem borel_eq_generateFrom_Ioo_rat :
borel β = .generateFrom (β (a : β) (b : β) (_ : a < b), {Ioo (a : β) (b : β)}) :=
isTopologicalBasis_Ioo_rat.borel_eq_generateFrom
#align real.borel_eq_generate_from_Ioo_rat Real.borel_eq_generateFrom_Ioo_rat
theorem borel_eq_generateFrom_Iio_rat : borel β = .generateFrom (β a : β, {Iio (a : β)}) := by
rw [borel_eq_generateFrom_Iio]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsLUB (range ((β) : β β β) β© Iio a) a := by
simp [isLUB_iff_le_iff, mem_upperBounds, β le_iff_forall_rat_lt_imp_le]
rw [β this.biUnion_Iio_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Iio (b : β)) (by simp)
theorem borel_eq_generateFrom_Ioi_rat : borel β = .generateFrom (β a : β, {Ioi (a : β)}) := by
rw [borel_eq_generateFrom_Ioi]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsGLB (range ((β) : β β β) β© Ioi a) a := by
simp [isGLB_iff_le_iff, mem_lowerBounds, β le_iff_forall_lt_rat_imp_le]
rw [β this.biUnion_Ioi_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Ioi (b : β)) (by simp)
theorem borel_eq_generateFrom_Iic_rat : borel β = .generateFrom (β a : β, {Iic (a : β)}) := by
rw [borel_eq_generateFrom_Ioi_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range]
refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;>
rintro _ β¨q, rflβ© <;>
dsimp only <;>
[rw [β compl_Iic]; rw [β compl_Ioi]] <;>
exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
theorem borel_eq_generateFrom_Ici_rat : borel β = .generateFrom (β a : β, {Ici (a : β)}) := by
rw [borel_eq_generateFrom_Iio_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range]
refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;>
rintro _ β¨q, rflβ© <;>
dsimp only <;>
[rw [β compl_Ici]; rw [β compl_Iio]] <;>
exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
theorem isPiSystem_Ioo_rat :
IsPiSystem (β (a : β) (b : β) (_ : a < b), {Ioo (a : β) (b : β)}) := by
convert isPiSystem_Ioo ((β) : β β β) ((β) : β β β)
ext x
simp [eq_comm]
#align real.is_pi_system_Ioo_rat Real.isPiSystem_Ioo_rat
theorem isPiSystem_Iio_rat : IsPiSystem (β a : β, {Iio (a : β)}) := by
convert isPiSystem_image_Iio (((β) : β β β) '' univ)
ext x
simp only [iUnion_singleton_eq_range, mem_range, image_univ, mem_image, exists_exists_eq_and]
theorem isPiSystem_Ioi_rat : IsPiSystem (β a : β, {Ioi (a : β)}) := by
convert isPiSystem_image_Ioi (((β) : β β β) '' univ)
ext x
simp only [iUnion_singleton_eq_range, mem_range, image_univ, mem_image, exists_exists_eq_and]
| Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean | 101 | 104 | theorem isPiSystem_Iic_rat : IsPiSystem (β a : β, {Iic (a : β)}) := by |
convert isPiSystem_image_Iic (((β) : β β β) '' univ)
ext x
simp only [iUnion_singleton_eq_range, mem_range, image_univ, mem_image, exists_exists_eq_and]
| 3 | 20.085537 | 1 | 1.444444 | 9 | 1,528 |
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce"
open Set Filter MeasureTheory MeasurableSpace
open scoped Classical Topology NNReal ENNReal MeasureTheory
universe u v w x y
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {ΞΉ : Sort y} {s t u : Set Ξ±}
namespace Real
theorem borel_eq_generateFrom_Ioo_rat :
borel β = .generateFrom (β (a : β) (b : β) (_ : a < b), {Ioo (a : β) (b : β)}) :=
isTopologicalBasis_Ioo_rat.borel_eq_generateFrom
#align real.borel_eq_generate_from_Ioo_rat Real.borel_eq_generateFrom_Ioo_rat
theorem borel_eq_generateFrom_Iio_rat : borel β = .generateFrom (β a : β, {Iio (a : β)}) := by
rw [borel_eq_generateFrom_Iio]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsLUB (range ((β) : β β β) β© Iio a) a := by
simp [isLUB_iff_le_iff, mem_upperBounds, β le_iff_forall_rat_lt_imp_le]
rw [β this.biUnion_Iio_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Iio (b : β)) (by simp)
theorem borel_eq_generateFrom_Ioi_rat : borel β = .generateFrom (β a : β, {Ioi (a : β)}) := by
rw [borel_eq_generateFrom_Ioi]
refine le_antisymm
(generateFrom_le ?_)
(generateFrom_mono <| iUnion_subset fun q β¦ singleton_subset_iff.mpr <| mem_range_self _)
rintro _ β¨a, rflβ©
have : IsGLB (range ((β) : β β β) β© Ioi a) a := by
simp [isGLB_iff_le_iff, mem_lowerBounds, β le_iff_forall_lt_rat_imp_le]
rw [β this.biUnion_Ioi_eq, β image_univ, β image_inter_preimage, univ_inter, biUnion_image]
exact MeasurableSet.biUnion (to_countable _)
fun b _ => GenerateMeasurable.basic (Ioi (b : β)) (by simp)
theorem borel_eq_generateFrom_Iic_rat : borel β = .generateFrom (β a : β, {Iic (a : β)}) := by
rw [borel_eq_generateFrom_Ioi_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range]
refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;>
rintro _ β¨q, rflβ© <;>
dsimp only <;>
[rw [β compl_Iic]; rw [β compl_Ioi]] <;>
exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
theorem borel_eq_generateFrom_Ici_rat : borel β = .generateFrom (β a : β, {Ici (a : β)}) := by
rw [borel_eq_generateFrom_Iio_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range]
refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;>
rintro _ β¨q, rflβ© <;>
dsimp only <;>
[rw [β compl_Ici]; rw [β compl_Iio]] <;>
exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
theorem isPiSystem_Ioo_rat :
IsPiSystem (β (a : β) (b : β) (_ : a < b), {Ioo (a : β) (b : β)}) := by
convert isPiSystem_Ioo ((β) : β β β) ((β) : β β β)
ext x
simp [eq_comm]
#align real.is_pi_system_Ioo_rat Real.isPiSystem_Ioo_rat
theorem isPiSystem_Iio_rat : IsPiSystem (β a : β, {Iio (a : β)}) := by
convert isPiSystem_image_Iio (((β) : β β β) '' univ)
ext x
simp only [iUnion_singleton_eq_range, mem_range, image_univ, mem_image, exists_exists_eq_and]
theorem isPiSystem_Ioi_rat : IsPiSystem (β a : β, {Ioi (a : β)}) := by
convert isPiSystem_image_Ioi (((β) : β β β) '' univ)
ext x
simp only [iUnion_singleton_eq_range, mem_range, image_univ, mem_image, exists_exists_eq_and]
theorem isPiSystem_Iic_rat : IsPiSystem (β a : β, {Iic (a : β)}) := by
convert isPiSystem_image_Iic (((β) : β β β) '' univ)
ext x
simp only [iUnion_singleton_eq_range, mem_range, image_univ, mem_image, exists_exists_eq_and]
| Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean | 106 | 109 | theorem isPiSystem_Ici_rat : IsPiSystem (β a : β, {Ici (a : β)}) := by |
convert isPiSystem_image_Ici (((β) : β β β) '' univ)
ext x
simp only [iUnion_singleton_eq_range, mem_range, image_univ, mem_image, exists_exists_eq_and]
| 3 | 20.085537 | 1 | 1.444444 | 9 | 1,528 |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.Sym.Sym2
namespace List
variable {Ξ± : Type*}
section Sym2
protected def sym2 : List Ξ± β List (Sym2 Ξ±)
| [] => []
| x :: xs => (x :: xs).map (fun y => s(x, y)) ++ xs.sym2
| Mathlib/Data/List/Sym.lean | 40 | 43 | theorem mem_sym2_cons_iff {x : Ξ±} {xs : List Ξ±} {z : Sym2 Ξ±} :
z β (x :: xs).sym2 β z = s(x, x) β¨ (β y, y β xs β§ z = s(x, y)) β¨ z β xs.sym2 := by |
simp only [List.sym2, map_cons, cons_append, mem_cons, mem_append, mem_map]
simp only [eq_comm]
| 2 | 7.389056 | 1 | 1.444444 | 9 | 1,529 |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.Sym.Sym2
namespace List
variable {Ξ± : Type*}
section Sym2
protected def sym2 : List Ξ± β List (Sym2 Ξ±)
| [] => []
| x :: xs => (x :: xs).map (fun y => s(x, y)) ++ xs.sym2
theorem mem_sym2_cons_iff {x : Ξ±} {xs : List Ξ±} {z : Sym2 Ξ±} :
z β (x :: xs).sym2 β z = s(x, x) β¨ (β y, y β xs β§ z = s(x, y)) β¨ z β xs.sym2 := by
simp only [List.sym2, map_cons, cons_append, mem_cons, mem_append, mem_map]
simp only [eq_comm]
@[simp]
| Mathlib/Data/List/Sym.lean | 46 | 47 | theorem sym2_eq_nil_iff {xs : List Ξ±} : xs.sym2 = [] β xs = [] := by |
cases xs <;> simp [List.sym2]
| 1 | 2.718282 | 0 | 1.444444 | 9 | 1,529 |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.Sym.Sym2
namespace List
variable {Ξ± : Type*}
section Sym2
protected def sym2 : List Ξ± β List (Sym2 Ξ±)
| [] => []
| x :: xs => (x :: xs).map (fun y => s(x, y)) ++ xs.sym2
theorem mem_sym2_cons_iff {x : Ξ±} {xs : List Ξ±} {z : Sym2 Ξ±} :
z β (x :: xs).sym2 β z = s(x, x) β¨ (β y, y β xs β§ z = s(x, y)) β¨ z β xs.sym2 := by
simp only [List.sym2, map_cons, cons_append, mem_cons, mem_append, mem_map]
simp only [eq_comm]
@[simp]
theorem sym2_eq_nil_iff {xs : List Ξ±} : xs.sym2 = [] β xs = [] := by
cases xs <;> simp [List.sym2]
| Mathlib/Data/List/Sym.lean | 49 | 61 | theorem left_mem_of_mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±}
(h : s(a, b) β xs.sym2) : a β xs := by |
induction xs with
| nil => exact (not_mem_nil _ h).elim
| cons x xs ih =>
rw [mem_cons]
rw [mem_sym2_cons_iff] at h
obtain (h | β¨c, hc, hβ© | h) := h
Β· rw [Sym2.eq_iff, β and_or_left] at h
exact .inl h.1
Β· rw [Sym2.eq_iff] at h
obtain (β¨rfl, rflβ© | β¨rfl, rflβ©) := h <;> simp [hc]
Β· exact .inr <| ih h
| 11 | 59,874.141715 | 2 | 1.444444 | 9 | 1,529 |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.Sym.Sym2
namespace List
variable {Ξ± : Type*}
section Sym2
protected def sym2 : List Ξ± β List (Sym2 Ξ±)
| [] => []
| x :: xs => (x :: xs).map (fun y => s(x, y)) ++ xs.sym2
theorem mem_sym2_cons_iff {x : Ξ±} {xs : List Ξ±} {z : Sym2 Ξ±} :
z β (x :: xs).sym2 β z = s(x, x) β¨ (β y, y β xs β§ z = s(x, y)) β¨ z β xs.sym2 := by
simp only [List.sym2, map_cons, cons_append, mem_cons, mem_append, mem_map]
simp only [eq_comm]
@[simp]
theorem sym2_eq_nil_iff {xs : List Ξ±} : xs.sym2 = [] β xs = [] := by
cases xs <;> simp [List.sym2]
theorem left_mem_of_mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±}
(h : s(a, b) β xs.sym2) : a β xs := by
induction xs with
| nil => exact (not_mem_nil _ h).elim
| cons x xs ih =>
rw [mem_cons]
rw [mem_sym2_cons_iff] at h
obtain (h | β¨c, hc, hβ© | h) := h
Β· rw [Sym2.eq_iff, β and_or_left] at h
exact .inl h.1
Β· rw [Sym2.eq_iff] at h
obtain (β¨rfl, rflβ© | β¨rfl, rflβ©) := h <;> simp [hc]
Β· exact .inr <| ih h
| Mathlib/Data/List/Sym.lean | 63 | 66 | theorem right_mem_of_mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±}
(h : s(a, b) β xs.sym2) : b β xs := by |
rw [Sym2.eq_swap] at h
exact left_mem_of_mk_mem_sym2 h
| 2 | 7.389056 | 1 | 1.444444 | 9 | 1,529 |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.Sym.Sym2
namespace List
variable {Ξ± : Type*}
section Sym2
protected def sym2 : List Ξ± β List (Sym2 Ξ±)
| [] => []
| x :: xs => (x :: xs).map (fun y => s(x, y)) ++ xs.sym2
theorem mem_sym2_cons_iff {x : Ξ±} {xs : List Ξ±} {z : Sym2 Ξ±} :
z β (x :: xs).sym2 β z = s(x, x) β¨ (β y, y β xs β§ z = s(x, y)) β¨ z β xs.sym2 := by
simp only [List.sym2, map_cons, cons_append, mem_cons, mem_append, mem_map]
simp only [eq_comm]
@[simp]
theorem sym2_eq_nil_iff {xs : List Ξ±} : xs.sym2 = [] β xs = [] := by
cases xs <;> simp [List.sym2]
theorem left_mem_of_mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±}
(h : s(a, b) β xs.sym2) : a β xs := by
induction xs with
| nil => exact (not_mem_nil _ h).elim
| cons x xs ih =>
rw [mem_cons]
rw [mem_sym2_cons_iff] at h
obtain (h | β¨c, hc, hβ© | h) := h
Β· rw [Sym2.eq_iff, β and_or_left] at h
exact .inl h.1
Β· rw [Sym2.eq_iff] at h
obtain (β¨rfl, rflβ© | β¨rfl, rflβ©) := h <;> simp [hc]
Β· exact .inr <| ih h
theorem right_mem_of_mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±}
(h : s(a, b) β xs.sym2) : b β xs := by
rw [Sym2.eq_swap] at h
exact left_mem_of_mk_mem_sym2 h
| Mathlib/Data/List/Sym.lean | 68 | 79 | theorem mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±} (ha : a β xs) (hb : b β xs) :
s(a, b) β xs.sym2 := by |
induction xs with
| nil => simp at ha
| cons x xs ih =>
rw [mem_sym2_cons_iff]
rw [mem_cons] at ha hb
obtain (rfl | ha) := ha <;> obtain (rfl | hb) := hb
Β· left; rfl
Β· right; left; use b
Β· right; left; rw [Sym2.eq_swap]; use a
Β· right; right; exact ih ha hb
| 10 | 22,026.465795 | 2 | 1.444444 | 9 | 1,529 |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.Sym.Sym2
namespace List
variable {Ξ± : Type*}
section Sym2
protected def sym2 : List Ξ± β List (Sym2 Ξ±)
| [] => []
| x :: xs => (x :: xs).map (fun y => s(x, y)) ++ xs.sym2
theorem mem_sym2_cons_iff {x : Ξ±} {xs : List Ξ±} {z : Sym2 Ξ±} :
z β (x :: xs).sym2 β z = s(x, x) β¨ (β y, y β xs β§ z = s(x, y)) β¨ z β xs.sym2 := by
simp only [List.sym2, map_cons, cons_append, mem_cons, mem_append, mem_map]
simp only [eq_comm]
@[simp]
theorem sym2_eq_nil_iff {xs : List Ξ±} : xs.sym2 = [] β xs = [] := by
cases xs <;> simp [List.sym2]
theorem left_mem_of_mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±}
(h : s(a, b) β xs.sym2) : a β xs := by
induction xs with
| nil => exact (not_mem_nil _ h).elim
| cons x xs ih =>
rw [mem_cons]
rw [mem_sym2_cons_iff] at h
obtain (h | β¨c, hc, hβ© | h) := h
Β· rw [Sym2.eq_iff, β and_or_left] at h
exact .inl h.1
Β· rw [Sym2.eq_iff] at h
obtain (β¨rfl, rflβ© | β¨rfl, rflβ©) := h <;> simp [hc]
Β· exact .inr <| ih h
theorem right_mem_of_mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±}
(h : s(a, b) β xs.sym2) : b β xs := by
rw [Sym2.eq_swap] at h
exact left_mem_of_mk_mem_sym2 h
theorem mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±} (ha : a β xs) (hb : b β xs) :
s(a, b) β xs.sym2 := by
induction xs with
| nil => simp at ha
| cons x xs ih =>
rw [mem_sym2_cons_iff]
rw [mem_cons] at ha hb
obtain (rfl | ha) := ha <;> obtain (rfl | hb) := hb
Β· left; rfl
Β· right; left; use b
Β· right; left; rw [Sym2.eq_swap]; use a
Β· right; right; exact ih ha hb
| Mathlib/Data/List/Sym.lean | 81 | 87 | theorem mk_mem_sym2_iff {xs : List Ξ±} {a b : Ξ±} :
s(a, b) β xs.sym2 β a β xs β§ b β xs := by |
constructor
Β· intro h
exact β¨left_mem_of_mk_mem_sym2 h, right_mem_of_mk_mem_sym2 hβ©
Β· rintro β¨ha, hbβ©
exact mk_mem_sym2 ha hb
| 5 | 148.413159 | 2 | 1.444444 | 9 | 1,529 |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.Sym.Sym2
namespace List
variable {Ξ± : Type*}
section Sym2
protected def sym2 : List Ξ± β List (Sym2 Ξ±)
| [] => []
| x :: xs => (x :: xs).map (fun y => s(x, y)) ++ xs.sym2
theorem mem_sym2_cons_iff {x : Ξ±} {xs : List Ξ±} {z : Sym2 Ξ±} :
z β (x :: xs).sym2 β z = s(x, x) β¨ (β y, y β xs β§ z = s(x, y)) β¨ z β xs.sym2 := by
simp only [List.sym2, map_cons, cons_append, mem_cons, mem_append, mem_map]
simp only [eq_comm]
@[simp]
theorem sym2_eq_nil_iff {xs : List Ξ±} : xs.sym2 = [] β xs = [] := by
cases xs <;> simp [List.sym2]
theorem left_mem_of_mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±}
(h : s(a, b) β xs.sym2) : a β xs := by
induction xs with
| nil => exact (not_mem_nil _ h).elim
| cons x xs ih =>
rw [mem_cons]
rw [mem_sym2_cons_iff] at h
obtain (h | β¨c, hc, hβ© | h) := h
Β· rw [Sym2.eq_iff, β and_or_left] at h
exact .inl h.1
Β· rw [Sym2.eq_iff] at h
obtain (β¨rfl, rflβ© | β¨rfl, rflβ©) := h <;> simp [hc]
Β· exact .inr <| ih h
theorem right_mem_of_mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±}
(h : s(a, b) β xs.sym2) : b β xs := by
rw [Sym2.eq_swap] at h
exact left_mem_of_mk_mem_sym2 h
theorem mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±} (ha : a β xs) (hb : b β xs) :
s(a, b) β xs.sym2 := by
induction xs with
| nil => simp at ha
| cons x xs ih =>
rw [mem_sym2_cons_iff]
rw [mem_cons] at ha hb
obtain (rfl | ha) := ha <;> obtain (rfl | hb) := hb
Β· left; rfl
Β· right; left; use b
Β· right; left; rw [Sym2.eq_swap]; use a
Β· right; right; exact ih ha hb
theorem mk_mem_sym2_iff {xs : List Ξ±} {a b : Ξ±} :
s(a, b) β xs.sym2 β a β xs β§ b β xs := by
constructor
Β· intro h
exact β¨left_mem_of_mk_mem_sym2 h, right_mem_of_mk_mem_sym2 hβ©
Β· rintro β¨ha, hbβ©
exact mk_mem_sym2 ha hb
| Mathlib/Data/List/Sym.lean | 89 | 92 | theorem mem_sym2_iff {xs : List Ξ±} {z : Sym2 Ξ±} :
z β xs.sym2 β β y β z, y β xs := by |
refine z.ind (fun a b => ?_)
simp [mk_mem_sym2_iff]
| 2 | 7.389056 | 1 | 1.444444 | 9 | 1,529 |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.Sym.Sym2
namespace List
variable {Ξ± : Type*}
section Sym2
protected def sym2 : List Ξ± β List (Sym2 Ξ±)
| [] => []
| x :: xs => (x :: xs).map (fun y => s(x, y)) ++ xs.sym2
theorem mem_sym2_cons_iff {x : Ξ±} {xs : List Ξ±} {z : Sym2 Ξ±} :
z β (x :: xs).sym2 β z = s(x, x) β¨ (β y, y β xs β§ z = s(x, y)) β¨ z β xs.sym2 := by
simp only [List.sym2, map_cons, cons_append, mem_cons, mem_append, mem_map]
simp only [eq_comm]
@[simp]
theorem sym2_eq_nil_iff {xs : List Ξ±} : xs.sym2 = [] β xs = [] := by
cases xs <;> simp [List.sym2]
theorem left_mem_of_mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±}
(h : s(a, b) β xs.sym2) : a β xs := by
induction xs with
| nil => exact (not_mem_nil _ h).elim
| cons x xs ih =>
rw [mem_cons]
rw [mem_sym2_cons_iff] at h
obtain (h | β¨c, hc, hβ© | h) := h
Β· rw [Sym2.eq_iff, β and_or_left] at h
exact .inl h.1
Β· rw [Sym2.eq_iff] at h
obtain (β¨rfl, rflβ© | β¨rfl, rflβ©) := h <;> simp [hc]
Β· exact .inr <| ih h
theorem right_mem_of_mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±}
(h : s(a, b) β xs.sym2) : b β xs := by
rw [Sym2.eq_swap] at h
exact left_mem_of_mk_mem_sym2 h
theorem mk_mem_sym2 {xs : List Ξ±} {a b : Ξ±} (ha : a β xs) (hb : b β xs) :
s(a, b) β xs.sym2 := by
induction xs with
| nil => simp at ha
| cons x xs ih =>
rw [mem_sym2_cons_iff]
rw [mem_cons] at ha hb
obtain (rfl | ha) := ha <;> obtain (rfl | hb) := hb
Β· left; rfl
Β· right; left; use b
Β· right; left; rw [Sym2.eq_swap]; use a
Β· right; right; exact ih ha hb
theorem mk_mem_sym2_iff {xs : List Ξ±} {a b : Ξ±} :
s(a, b) β xs.sym2 β a β xs β§ b β xs := by
constructor
Β· intro h
exact β¨left_mem_of_mk_mem_sym2 h, right_mem_of_mk_mem_sym2 hβ©
Β· rintro β¨ha, hbβ©
exact mk_mem_sym2 ha hb
theorem mem_sym2_iff {xs : List Ξ±} {z : Sym2 Ξ±} :
z β xs.sym2 β β y β z, y β xs := by
refine z.ind (fun a b => ?_)
simp [mk_mem_sym2_iff]
protected theorem Nodup.sym2 {xs : List Ξ±} (h : xs.Nodup) : xs.sym2.Nodup := by
induction xs with
| nil => simp only [List.sym2, nodup_nil]
| cons x xs ih =>
rw [List.sym2]
specialize ih h.of_cons
rw [nodup_cons] at h
refine Nodup.append (Nodup.cons ?notmem (h.2.map ?inj)) ih ?disj
case disj =>
intro z hz hz'
simp only [mem_cons, mem_map] at hz
obtain β¨_, (rfl | _), rflβ© := hz
<;> simp [left_mem_of_mk_mem_sym2 hz'] at h
case notmem =>
intro h'
simp only [h.1, mem_map, Sym2.eq_iff, true_and, or_self, exists_eq_right] at h'
case inj =>
intro a b
simp only [Sym2.eq_iff, true_and]
rintro (rfl | β¨rfl, rflβ©) <;> rfl
protected theorem Perm.sym2 {xs ys : List Ξ±} (h : xs ~ ys) :
xs.sym2 ~ ys.sym2 := by
induction h with
| nil => rfl
| cons x h ih =>
simp only [List.sym2, map_cons, cons_append, perm_cons]
exact (h.map _).append ih
| swap x y xs =>
simp only [List.sym2, map_cons, cons_append]
conv => enter [1,2,1]; rw [Sym2.eq_swap]
-- Explicit permutation to speed up simps that follow.
refine Perm.trans (Perm.swap ..) (Perm.trans (Perm.cons _ ?_) (Perm.swap ..))
simp only [β Multiset.coe_eq_coe, β Multiset.cons_coe,
β Multiset.coe_add, β Multiset.singleton_add]
simp only [add_assoc, add_left_comm]
| trans _ _ ih1 ih2 => exact ih1.trans ih2
protected theorem Sublist.sym2 {xs ys : List Ξ±} (h : xs <+ ys) : xs.sym2 <+ ys.sym2 := by
induction h with
| slnil => apply slnil
| cons a h ih =>
simp only [List.sym2]
exact Sublist.append (nil_sublist _) ih
| consβ a h ih =>
simp only [List.sym2, map_cons, cons_append]
exact consβ _ (append (Sublist.map _ h) ih)
protected theorem Subperm.sym2 {xs ys : List Ξ±} (h : xs <+~ ys) : xs.sym2 <+~ ys.sym2 := by
obtain β¨xs', hx, hβ© := h
exact hx.sym2.symm.subperm.trans h.sym2.subperm
| Mathlib/Data/List/Sym.lean | 146 | 151 | theorem length_sym2 {xs : List Ξ±} : xs.sym2.length = Nat.choose (xs.length + 1) 2 := by |
induction xs with
| nil => rfl
| cons x xs ih =>
rw [List.sym2, length_append, length_map, length_cons,
Nat.choose_succ_succ, β ih, Nat.choose_one_right]
| 5 | 148.413159 | 2 | 1.444444 | 9 | 1,529 |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.Sym.Sym2
namespace List
variable {Ξ± : Type*}
section Sym
protected def sym : (n : β) β List Ξ± β List (Sym Ξ± n)
| 0, _ => [.nil]
| _, [] => []
| n + 1, x :: xs => ((x :: xs).sym n |>.map fun p => x ::β p) ++ xs.sym (n + 1)
variable {xs ys : List Ξ±} {n : β}
| Mathlib/Data/List/Sym.lean | 165 | 169 | theorem sym_one_eq : xs.sym 1 = xs.map (Β· ::β .nil) := by |
induction xs with
| nil => simp only [List.sym, Nat.succ_eq_add_one, Nat.reduceAdd, map_nil]
| cons x xs ih =>
rw [map_cons, β ih, List.sym, List.sym, map_singleton, singleton_append]
| 4 | 54.59815 | 2 | 1.444444 | 9 | 1,529 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
open Set Filter ENNReal Topology NNReal TopologicalSpace
namespace MeasureTheory
namespace Measure
def InnerRegularWRT {Ξ±} {_ : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (p q : Set Ξ± β Prop) :=
β β¦Uβ¦, q U β β r < ΞΌ U, β K, K β U β§ p K β§ r < ΞΌ K
#align measure_theory.measure.inner_regular MeasureTheory.Measure.InnerRegularWRT
namespace InnerRegularWRT
variable {Ξ± : Type*} {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {p q : Set Ξ± β Prop} {U : Set Ξ±}
{Ξ΅ : ββ₯0β}
| Mathlib/MeasureTheory/Measure/Regular.lean | 215 | 219 | theorem measure_eq_iSup (H : InnerRegularWRT ΞΌ p q) (hU : q U) :
ΞΌ U = β¨ (K) (_ : K β U) (_ : p K), ΞΌ K := by |
refine
le_antisymm (le_of_forall_lt fun r hr => ?_) (iSupβ_le fun K hK => iSup_le fun _ => ΞΌ.mono hK)
simpa only [lt_iSup_iff, exists_prop] using H hU r hr
| 3 | 20.085537 | 1 | 1.444444 | 9 | 1,530 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
open Set Filter ENNReal Topology NNReal TopologicalSpace
namespace MeasureTheory
namespace Measure
def InnerRegularWRT {Ξ±} {_ : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (p q : Set Ξ± β Prop) :=
β β¦Uβ¦, q U β β r < ΞΌ U, β K, K β U β§ p K β§ r < ΞΌ K
#align measure_theory.measure.inner_regular MeasureTheory.Measure.InnerRegularWRT
namespace InnerRegularWRT
variable {Ξ± : Type*} {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {p q : Set Ξ± β Prop} {U : Set Ξ±}
{Ξ΅ : ββ₯0β}
theorem measure_eq_iSup (H : InnerRegularWRT ΞΌ p q) (hU : q U) :
ΞΌ U = β¨ (K) (_ : K β U) (_ : p K), ΞΌ K := by
refine
le_antisymm (le_of_forall_lt fun r hr => ?_) (iSupβ_le fun K hK => iSup_le fun _ => ΞΌ.mono hK)
simpa only [lt_iSup_iff, exists_prop] using H hU r hr
#align measure_theory.measure.inner_regular.measure_eq_supr MeasureTheory.Measure.InnerRegularWRT.measure_eq_iSup
| Mathlib/MeasureTheory/Measure/Regular.lean | 222 | 228 | theorem exists_subset_lt_add (H : InnerRegularWRT ΞΌ p q) (h0 : p β
) (hU : q U) (hΞΌU : ΞΌ U β β)
(hΞ΅ : Ξ΅ β 0) : β K, K β U β§ p K β§ ΞΌ U < ΞΌ K + Ξ΅ := by |
rcases eq_or_ne (ΞΌ U) 0 with hβ | hβ
Β· refine β¨β
, empty_subset _, h0, ?_β©
rwa [measure_empty, hβ, zero_add, pos_iff_ne_zero]
Β· rcases H hU _ (ENNReal.sub_lt_self hΞΌU hβ hΞ΅) with β¨K, hKU, hKc, hrKβ©
exact β¨K, hKU, hKc, ENNReal.lt_add_of_sub_lt_right (Or.inl hΞΌU) hrKβ©
| 5 | 148.413159 | 2 | 1.444444 | 9 | 1,530 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
open Set Filter ENNReal Topology NNReal TopologicalSpace
namespace MeasureTheory
namespace Measure
def InnerRegularWRT {Ξ±} {_ : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (p q : Set Ξ± β Prop) :=
β β¦Uβ¦, q U β β r < ΞΌ U, β K, K β U β§ p K β§ r < ΞΌ K
#align measure_theory.measure.inner_regular MeasureTheory.Measure.InnerRegularWRT
namespace InnerRegularWRT
variable {Ξ± : Type*} {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {p q : Set Ξ± β Prop} {U : Set Ξ±}
{Ξ΅ : ββ₯0β}
theorem measure_eq_iSup (H : InnerRegularWRT ΞΌ p q) (hU : q U) :
ΞΌ U = β¨ (K) (_ : K β U) (_ : p K), ΞΌ K := by
refine
le_antisymm (le_of_forall_lt fun r hr => ?_) (iSupβ_le fun K hK => iSup_le fun _ => ΞΌ.mono hK)
simpa only [lt_iSup_iff, exists_prop] using H hU r hr
#align measure_theory.measure.inner_regular.measure_eq_supr MeasureTheory.Measure.InnerRegularWRT.measure_eq_iSup
theorem exists_subset_lt_add (H : InnerRegularWRT ΞΌ p q) (h0 : p β
) (hU : q U) (hΞΌU : ΞΌ U β β)
(hΞ΅ : Ξ΅ β 0) : β K, K β U β§ p K β§ ΞΌ U < ΞΌ K + Ξ΅ := by
rcases eq_or_ne (ΞΌ U) 0 with hβ | hβ
Β· refine β¨β
, empty_subset _, h0, ?_β©
rwa [measure_empty, hβ, zero_add, pos_iff_ne_zero]
Β· rcases H hU _ (ENNReal.sub_lt_self hΞΌU hβ hΞ΅) with β¨K, hKU, hKc, hrKβ©
exact β¨K, hKU, hKc, ENNReal.lt_add_of_sub_lt_right (Or.inl hΞΌU) hrKβ©
#align measure_theory.measure.inner_regular.exists_subset_lt_add MeasureTheory.Measure.InnerRegularWRT.exists_subset_lt_add
protected theorem map {Ξ± Ξ²} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²]
{ΞΌ : Measure Ξ±} {pa qa : Set Ξ± β Prop}
(H : InnerRegularWRT ΞΌ pa qa) {f : Ξ± β Ξ²} (hf : AEMeasurable f ΞΌ) {pb qb : Set Ξ² β Prop}
(hAB : β U, qb U β qa (f β»ΒΉ' U)) (hAB' : β K, pa K β pb (f '' K))
(hBβ : β U, qb U β MeasurableSet U) :
InnerRegularWRT (map f ΞΌ) pb qb := by
intro U hU r hr
rw [map_apply_of_aemeasurable hf (hBβ _ hU)] at hr
rcases H (hAB U hU) r hr with β¨K, hKU, hKc, hKβ©
refine β¨f '' K, image_subset_iff.2 hKU, hAB' _ hKc, ?_β©
exact hK.trans_le (le_map_apply_image hf _)
#align measure_theory.measure.inner_regular.map MeasureTheory.Measure.InnerRegularWRT.map
| Mathlib/MeasureTheory/Measure/Regular.lean | 244 | 252 | theorem map' {Ξ± Ξ²} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {ΞΌ : Measure Ξ±} {pa qa : Set Ξ± β Prop}
(H : InnerRegularWRT ΞΌ pa qa) (f : Ξ± βα΅ Ξ²) {pb qb : Set Ξ² β Prop}
(hAB : β U, qb U β qa (f β»ΒΉ' U)) (hAB' : β K, pa K β pb (f '' K)) :
InnerRegularWRT (map f ΞΌ) pb qb := by |
intro U hU r hr
rw [f.map_apply U] at hr
rcases H (hAB U hU) r hr with β¨K, hKU, hKc, hKβ©
refine β¨f '' K, image_subset_iff.2 hKU, hAB' _ hKc, ?_β©
rwa [f.map_apply, f.preimage_image]
| 5 | 148.413159 | 2 | 1.444444 | 9 | 1,530 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
open Set Filter ENNReal Topology NNReal TopologicalSpace
namespace MeasureTheory
namespace Measure
def InnerRegularWRT {Ξ±} {_ : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (p q : Set Ξ± β Prop) :=
β β¦Uβ¦, q U β β r < ΞΌ U, β K, K β U β§ p K β§ r < ΞΌ K
#align measure_theory.measure.inner_regular MeasureTheory.Measure.InnerRegularWRT
namespace InnerRegularWRT
variable {Ξ± : Type*} {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {p q : Set Ξ± β Prop} {U : Set Ξ±}
{Ξ΅ : ββ₯0β}
theorem measure_eq_iSup (H : InnerRegularWRT ΞΌ p q) (hU : q U) :
ΞΌ U = β¨ (K) (_ : K β U) (_ : p K), ΞΌ K := by
refine
le_antisymm (le_of_forall_lt fun r hr => ?_) (iSupβ_le fun K hK => iSup_le fun _ => ΞΌ.mono hK)
simpa only [lt_iSup_iff, exists_prop] using H hU r hr
#align measure_theory.measure.inner_regular.measure_eq_supr MeasureTheory.Measure.InnerRegularWRT.measure_eq_iSup
theorem exists_subset_lt_add (H : InnerRegularWRT ΞΌ p q) (h0 : p β
) (hU : q U) (hΞΌU : ΞΌ U β β)
(hΞ΅ : Ξ΅ β 0) : β K, K β U β§ p K β§ ΞΌ U < ΞΌ K + Ξ΅ := by
rcases eq_or_ne (ΞΌ U) 0 with hβ | hβ
Β· refine β¨β
, empty_subset _, h0, ?_β©
rwa [measure_empty, hβ, zero_add, pos_iff_ne_zero]
Β· rcases H hU _ (ENNReal.sub_lt_self hΞΌU hβ hΞ΅) with β¨K, hKU, hKc, hrKβ©
exact β¨K, hKU, hKc, ENNReal.lt_add_of_sub_lt_right (Or.inl hΞΌU) hrKβ©
#align measure_theory.measure.inner_regular.exists_subset_lt_add MeasureTheory.Measure.InnerRegularWRT.exists_subset_lt_add
protected theorem map {Ξ± Ξ²} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²]
{ΞΌ : Measure Ξ±} {pa qa : Set Ξ± β Prop}
(H : InnerRegularWRT ΞΌ pa qa) {f : Ξ± β Ξ²} (hf : AEMeasurable f ΞΌ) {pb qb : Set Ξ² β Prop}
(hAB : β U, qb U β qa (f β»ΒΉ' U)) (hAB' : β K, pa K β pb (f '' K))
(hBβ : β U, qb U β MeasurableSet U) :
InnerRegularWRT (map f ΞΌ) pb qb := by
intro U hU r hr
rw [map_apply_of_aemeasurable hf (hBβ _ hU)] at hr
rcases H (hAB U hU) r hr with β¨K, hKU, hKc, hKβ©
refine β¨f '' K, image_subset_iff.2 hKU, hAB' _ hKc, ?_β©
exact hK.trans_le (le_map_apply_image hf _)
#align measure_theory.measure.inner_regular.map MeasureTheory.Measure.InnerRegularWRT.map
theorem map' {Ξ± Ξ²} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {ΞΌ : Measure Ξ±} {pa qa : Set Ξ± β Prop}
(H : InnerRegularWRT ΞΌ pa qa) (f : Ξ± βα΅ Ξ²) {pb qb : Set Ξ² β Prop}
(hAB : β U, qb U β qa (f β»ΒΉ' U)) (hAB' : β K, pa K β pb (f '' K)) :
InnerRegularWRT (map f ΞΌ) pb qb := by
intro U hU r hr
rw [f.map_apply U] at hr
rcases H (hAB U hU) r hr with β¨K, hKU, hKc, hKβ©
refine β¨f '' K, image_subset_iff.2 hKU, hAB' _ hKc, ?_β©
rwa [f.map_apply, f.preimage_image]
| Mathlib/MeasureTheory/Measure/Regular.lean | 254 | 257 | theorem smul (H : InnerRegularWRT ΞΌ p q) (c : ββ₯0β) : InnerRegularWRT (c β’ ΞΌ) p q := by |
intro U hU r hr
rw [smul_apply, H.measure_eq_iSup hU, smul_eq_mul] at hr
simpa only [ENNReal.mul_iSup, lt_iSup_iff, exists_prop] using hr
| 3 | 20.085537 | 1 | 1.444444 | 9 | 1,530 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
open Set Filter ENNReal Topology NNReal TopologicalSpace
namespace MeasureTheory
namespace Measure
def InnerRegularWRT {Ξ±} {_ : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (p q : Set Ξ± β Prop) :=
β β¦Uβ¦, q U β β r < ΞΌ U, β K, K β U β§ p K β§ r < ΞΌ K
#align measure_theory.measure.inner_regular MeasureTheory.Measure.InnerRegularWRT
namespace InnerRegularWRT
variable {Ξ± : Type*} {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {p q : Set Ξ± β Prop} {U : Set Ξ±}
{Ξ΅ : ββ₯0β}
theorem measure_eq_iSup (H : InnerRegularWRT ΞΌ p q) (hU : q U) :
ΞΌ U = β¨ (K) (_ : K β U) (_ : p K), ΞΌ K := by
refine
le_antisymm (le_of_forall_lt fun r hr => ?_) (iSupβ_le fun K hK => iSup_le fun _ => ΞΌ.mono hK)
simpa only [lt_iSup_iff, exists_prop] using H hU r hr
#align measure_theory.measure.inner_regular.measure_eq_supr MeasureTheory.Measure.InnerRegularWRT.measure_eq_iSup
theorem exists_subset_lt_add (H : InnerRegularWRT ΞΌ p q) (h0 : p β
) (hU : q U) (hΞΌU : ΞΌ U β β)
(hΞ΅ : Ξ΅ β 0) : β K, K β U β§ p K β§ ΞΌ U < ΞΌ K + Ξ΅ := by
rcases eq_or_ne (ΞΌ U) 0 with hβ | hβ
Β· refine β¨β
, empty_subset _, h0, ?_β©
rwa [measure_empty, hβ, zero_add, pos_iff_ne_zero]
Β· rcases H hU _ (ENNReal.sub_lt_self hΞΌU hβ hΞ΅) with β¨K, hKU, hKc, hrKβ©
exact β¨K, hKU, hKc, ENNReal.lt_add_of_sub_lt_right (Or.inl hΞΌU) hrKβ©
#align measure_theory.measure.inner_regular.exists_subset_lt_add MeasureTheory.Measure.InnerRegularWRT.exists_subset_lt_add
protected theorem map {Ξ± Ξ²} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²]
{ΞΌ : Measure Ξ±} {pa qa : Set Ξ± β Prop}
(H : InnerRegularWRT ΞΌ pa qa) {f : Ξ± β Ξ²} (hf : AEMeasurable f ΞΌ) {pb qb : Set Ξ² β Prop}
(hAB : β U, qb U β qa (f β»ΒΉ' U)) (hAB' : β K, pa K β pb (f '' K))
(hBβ : β U, qb U β MeasurableSet U) :
InnerRegularWRT (map f ΞΌ) pb qb := by
intro U hU r hr
rw [map_apply_of_aemeasurable hf (hBβ _ hU)] at hr
rcases H (hAB U hU) r hr with β¨K, hKU, hKc, hKβ©
refine β¨f '' K, image_subset_iff.2 hKU, hAB' _ hKc, ?_β©
exact hK.trans_le (le_map_apply_image hf _)
#align measure_theory.measure.inner_regular.map MeasureTheory.Measure.InnerRegularWRT.map
theorem map' {Ξ± Ξ²} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {ΞΌ : Measure Ξ±} {pa qa : Set Ξ± β Prop}
(H : InnerRegularWRT ΞΌ pa qa) (f : Ξ± βα΅ Ξ²) {pb qb : Set Ξ² β Prop}
(hAB : β U, qb U β qa (f β»ΒΉ' U)) (hAB' : β K, pa K β pb (f '' K)) :
InnerRegularWRT (map f ΞΌ) pb qb := by
intro U hU r hr
rw [f.map_apply U] at hr
rcases H (hAB U hU) r hr with β¨K, hKU, hKc, hKβ©
refine β¨f '' K, image_subset_iff.2 hKU, hAB' _ hKc, ?_β©
rwa [f.map_apply, f.preimage_image]
theorem smul (H : InnerRegularWRT ΞΌ p q) (c : ββ₯0β) : InnerRegularWRT (c β’ ΞΌ) p q := by
intro U hU r hr
rw [smul_apply, H.measure_eq_iSup hU, smul_eq_mul] at hr
simpa only [ENNReal.mul_iSup, lt_iSup_iff, exists_prop] using hr
#align measure_theory.measure.inner_regular.smul MeasureTheory.Measure.InnerRegularWRT.smul
| Mathlib/MeasureTheory/Measure/Regular.lean | 260 | 264 | theorem trans {q' : Set Ξ± β Prop} (H : InnerRegularWRT ΞΌ p q) (H' : InnerRegularWRT ΞΌ q q') :
InnerRegularWRT ΞΌ p q' := by |
intro U hU r hr
rcases H' hU r hr with β¨F, hFU, hqF, hFβ©; rcases H hqF _ hF with β¨K, hKF, hpK, hrKβ©
exact β¨K, hKF.trans hFU, hpK, hrKβ©
| 3 | 20.085537 | 1 | 1.444444 | 9 | 1,530 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
open Set Filter ENNReal Topology NNReal TopologicalSpace
namespace MeasureTheory
namespace Measure
def InnerRegularWRT {Ξ±} {_ : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (p q : Set Ξ± β Prop) :=
β β¦Uβ¦, q U β β r < ΞΌ U, β K, K β U β§ p K β§ r < ΞΌ K
#align measure_theory.measure.inner_regular MeasureTheory.Measure.InnerRegularWRT
variable {Ξ± Ξ² : Type*} [MeasurableSpace Ξ±] [TopologicalSpace Ξ±] {ΞΌ : Measure Ξ±}
class OuterRegular (ΞΌ : Measure Ξ±) : Prop where
protected outerRegular :
β β¦A : Set Ξ±β¦, MeasurableSet A β β r > ΞΌ A, β U, U β A β§ IsOpen U β§ ΞΌ U < r
#align measure_theory.measure.outer_regular MeasureTheory.Measure.OuterRegular
#align measure_theory.measure.outer_regular.outer_regular MeasureTheory.Measure.OuterRegular.outerRegular
class Regular (ΞΌ : Measure Ξ±) extends IsFiniteMeasureOnCompacts ΞΌ, OuterRegular ΞΌ : Prop where
innerRegular : InnerRegularWRT ΞΌ IsCompact IsOpen
#align measure_theory.measure.regular MeasureTheory.Measure.Regular
class WeaklyRegular (ΞΌ : Measure Ξ±) extends OuterRegular ΞΌ : Prop where
protected innerRegular : InnerRegularWRT ΞΌ IsClosed IsOpen
#align measure_theory.measure.weakly_regular MeasureTheory.Measure.WeaklyRegular
#align measure_theory.measure.weakly_regular.inner_regular MeasureTheory.Measure.WeaklyRegular.innerRegular
class InnerRegular (ΞΌ : Measure Ξ±) : Prop where
protected innerRegular : InnerRegularWRT ΞΌ IsCompact (fun s β¦ MeasurableSet s)
class InnerRegularCompactLTTop (ΞΌ : Measure Ξ±) : Prop where
protected innerRegular : InnerRegularWRT ΞΌ IsCompact (fun s β¦ MeasurableSet s β§ ΞΌ s β β)
-- see Note [lower instance priority]
instance (priority := 100) Regular.weaklyRegular [R1Space Ξ±] [Regular ΞΌ] :
WeaklyRegular ΞΌ where
innerRegular := fun _U hU r hr β¦
let β¨K, KU, K_comp, hKβ© := Regular.innerRegular hU r hr
β¨closure K, K_comp.closure_subset_of_isOpen hU KU, isClosed_closure,
hK.trans_le (measure_mono subset_closure)β©
#align measure_theory.measure.regular.weakly_regular MeasureTheory.Measure.Regular.weaklyRegular
namespace OuterRegular
instance zero : OuterRegular (0 : Measure Ξ±) :=
β¨fun A _ _r hr => β¨univ, subset_univ A, isOpen_univ, hrβ©β©
#align measure_theory.measure.outer_regular.zero MeasureTheory.Measure.OuterRegular.zero
| Mathlib/MeasureTheory/Measure/Regular.lean | 339 | 344 | theorem _root_.Set.exists_isOpen_lt_of_lt [OuterRegular ΞΌ] (A : Set Ξ±) (r : ββ₯0β) (hr : ΞΌ A < r) :
β U, U β A β§ IsOpen U β§ ΞΌ U < r := by |
rcases OuterRegular.outerRegular (measurableSet_toMeasurable ΞΌ A) r
(by rwa [measure_toMeasurable]) with
β¨U, hAU, hUo, hUβ©
exact β¨U, (subset_toMeasurable _ _).trans hAU, hUo, hUβ©
| 4 | 54.59815 | 2 | 1.444444 | 9 | 1,530 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
open Set Filter ENNReal Topology NNReal TopologicalSpace
namespace MeasureTheory
namespace Measure
def InnerRegularWRT {Ξ±} {_ : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (p q : Set Ξ± β Prop) :=
β β¦Uβ¦, q U β β r < ΞΌ U, β K, K β U β§ p K β§ r < ΞΌ K
#align measure_theory.measure.inner_regular MeasureTheory.Measure.InnerRegularWRT
variable {Ξ± Ξ² : Type*} [MeasurableSpace Ξ±] [TopologicalSpace Ξ±] {ΞΌ : Measure Ξ±}
class OuterRegular (ΞΌ : Measure Ξ±) : Prop where
protected outerRegular :
β β¦A : Set Ξ±β¦, MeasurableSet A β β r > ΞΌ A, β U, U β A β§ IsOpen U β§ ΞΌ U < r
#align measure_theory.measure.outer_regular MeasureTheory.Measure.OuterRegular
#align measure_theory.measure.outer_regular.outer_regular MeasureTheory.Measure.OuterRegular.outerRegular
class Regular (ΞΌ : Measure Ξ±) extends IsFiniteMeasureOnCompacts ΞΌ, OuterRegular ΞΌ : Prop where
innerRegular : InnerRegularWRT ΞΌ IsCompact IsOpen
#align measure_theory.measure.regular MeasureTheory.Measure.Regular
class WeaklyRegular (ΞΌ : Measure Ξ±) extends OuterRegular ΞΌ : Prop where
protected innerRegular : InnerRegularWRT ΞΌ IsClosed IsOpen
#align measure_theory.measure.weakly_regular MeasureTheory.Measure.WeaklyRegular
#align measure_theory.measure.weakly_regular.inner_regular MeasureTheory.Measure.WeaklyRegular.innerRegular
class InnerRegular (ΞΌ : Measure Ξ±) : Prop where
protected innerRegular : InnerRegularWRT ΞΌ IsCompact (fun s β¦ MeasurableSet s)
class InnerRegularCompactLTTop (ΞΌ : Measure Ξ±) : Prop where
protected innerRegular : InnerRegularWRT ΞΌ IsCompact (fun s β¦ MeasurableSet s β§ ΞΌ s β β)
-- see Note [lower instance priority]
instance (priority := 100) Regular.weaklyRegular [R1Space Ξ±] [Regular ΞΌ] :
WeaklyRegular ΞΌ where
innerRegular := fun _U hU r hr β¦
let β¨K, KU, K_comp, hKβ© := Regular.innerRegular hU r hr
β¨closure K, K_comp.closure_subset_of_isOpen hU KU, isClosed_closure,
hK.trans_le (measure_mono subset_closure)β©
#align measure_theory.measure.regular.weakly_regular MeasureTheory.Measure.Regular.weaklyRegular
namespace OuterRegular
instance zero : OuterRegular (0 : Measure Ξ±) :=
β¨fun A _ _r hr => β¨univ, subset_univ A, isOpen_univ, hrβ©β©
#align measure_theory.measure.outer_regular.zero MeasureTheory.Measure.OuterRegular.zero
theorem _root_.Set.exists_isOpen_lt_of_lt [OuterRegular ΞΌ] (A : Set Ξ±) (r : ββ₯0β) (hr : ΞΌ A < r) :
β U, U β A β§ IsOpen U β§ ΞΌ U < r := by
rcases OuterRegular.outerRegular (measurableSet_toMeasurable ΞΌ A) r
(by rwa [measure_toMeasurable]) with
β¨U, hAU, hUo, hUβ©
exact β¨U, (subset_toMeasurable _ _).trans hAU, hUo, hUβ©
#align set.exists_is_open_lt_of_lt Set.exists_isOpen_lt_of_lt
| Mathlib/MeasureTheory/Measure/Regular.lean | 349 | 353 | theorem _root_.Set.measure_eq_iInf_isOpen (A : Set Ξ±) (ΞΌ : Measure Ξ±) [OuterRegular ΞΌ] :
ΞΌ A = β¨
(U : Set Ξ±) (_ : A β U) (_ : IsOpen U), ΞΌ U := by |
refine le_antisymm (le_iInfβ fun s hs => le_iInf fun _ => ΞΌ.mono hs) ?_
refine le_of_forall_lt' fun r hr => ?_
simpa only [iInf_lt_iff, exists_prop] using A.exists_isOpen_lt_of_lt r hr
| 3 | 20.085537 | 1 | 1.444444 | 9 | 1,530 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
open Set Filter ENNReal Topology NNReal TopologicalSpace
namespace MeasureTheory
namespace Measure
def InnerRegularWRT {Ξ±} {_ : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (p q : Set Ξ± β Prop) :=
β β¦Uβ¦, q U β β r < ΞΌ U, β K, K β U β§ p K β§ r < ΞΌ K
#align measure_theory.measure.inner_regular MeasureTheory.Measure.InnerRegularWRT
variable {Ξ± Ξ² : Type*} [MeasurableSpace Ξ±] [TopologicalSpace Ξ±] {ΞΌ : Measure Ξ±}
class OuterRegular (ΞΌ : Measure Ξ±) : Prop where
protected outerRegular :
β β¦A : Set Ξ±β¦, MeasurableSet A β β r > ΞΌ A, β U, U β A β§ IsOpen U β§ ΞΌ U < r
#align measure_theory.measure.outer_regular MeasureTheory.Measure.OuterRegular
#align measure_theory.measure.outer_regular.outer_regular MeasureTheory.Measure.OuterRegular.outerRegular
class Regular (ΞΌ : Measure Ξ±) extends IsFiniteMeasureOnCompacts ΞΌ, OuterRegular ΞΌ : Prop where
innerRegular : InnerRegularWRT ΞΌ IsCompact IsOpen
#align measure_theory.measure.regular MeasureTheory.Measure.Regular
class WeaklyRegular (ΞΌ : Measure Ξ±) extends OuterRegular ΞΌ : Prop where
protected innerRegular : InnerRegularWRT ΞΌ IsClosed IsOpen
#align measure_theory.measure.weakly_regular MeasureTheory.Measure.WeaklyRegular
#align measure_theory.measure.weakly_regular.inner_regular MeasureTheory.Measure.WeaklyRegular.innerRegular
class InnerRegular (ΞΌ : Measure Ξ±) : Prop where
protected innerRegular : InnerRegularWRT ΞΌ IsCompact (fun s β¦ MeasurableSet s)
class InnerRegularCompactLTTop (ΞΌ : Measure Ξ±) : Prop where
protected innerRegular : InnerRegularWRT ΞΌ IsCompact (fun s β¦ MeasurableSet s β§ ΞΌ s β β)
-- see Note [lower instance priority]
instance (priority := 100) Regular.weaklyRegular [R1Space Ξ±] [Regular ΞΌ] :
WeaklyRegular ΞΌ where
innerRegular := fun _U hU r hr β¦
let β¨K, KU, K_comp, hKβ© := Regular.innerRegular hU r hr
β¨closure K, K_comp.closure_subset_of_isOpen hU KU, isClosed_closure,
hK.trans_le (measure_mono subset_closure)β©
#align measure_theory.measure.regular.weakly_regular MeasureTheory.Measure.Regular.weaklyRegular
namespace OuterRegular
instance zero : OuterRegular (0 : Measure Ξ±) :=
β¨fun A _ _r hr => β¨univ, subset_univ A, isOpen_univ, hrβ©β©
#align measure_theory.measure.outer_regular.zero MeasureTheory.Measure.OuterRegular.zero
theorem _root_.Set.exists_isOpen_lt_of_lt [OuterRegular ΞΌ] (A : Set Ξ±) (r : ββ₯0β) (hr : ΞΌ A < r) :
β U, U β A β§ IsOpen U β§ ΞΌ U < r := by
rcases OuterRegular.outerRegular (measurableSet_toMeasurable ΞΌ A) r
(by rwa [measure_toMeasurable]) with
β¨U, hAU, hUo, hUβ©
exact β¨U, (subset_toMeasurable _ _).trans hAU, hUo, hUβ©
#align set.exists_is_open_lt_of_lt Set.exists_isOpen_lt_of_lt
theorem _root_.Set.measure_eq_iInf_isOpen (A : Set Ξ±) (ΞΌ : Measure Ξ±) [OuterRegular ΞΌ] :
ΞΌ A = β¨
(U : Set Ξ±) (_ : A β U) (_ : IsOpen U), ΞΌ U := by
refine le_antisymm (le_iInfβ fun s hs => le_iInf fun _ => ΞΌ.mono hs) ?_
refine le_of_forall_lt' fun r hr => ?_
simpa only [iInf_lt_iff, exists_prop] using A.exists_isOpen_lt_of_lt r hr
#align set.measure_eq_infi_is_open Set.measure_eq_iInf_isOpen
theorem _root_.Set.exists_isOpen_lt_add [OuterRegular ΞΌ] (A : Set Ξ±) (hA : ΞΌ A β β) {Ξ΅ : ββ₯0β}
(hΞ΅ : Ξ΅ β 0) : β U, U β A β§ IsOpen U β§ ΞΌ U < ΞΌ A + Ξ΅ :=
A.exists_isOpen_lt_of_lt _ (ENNReal.lt_add_right hA hΞ΅)
#align set.exists_is_open_lt_add Set.exists_isOpen_lt_add
| Mathlib/MeasureTheory/Measure/Regular.lean | 361 | 366 | theorem _root_.Set.exists_isOpen_le_add (A : Set Ξ±) (ΞΌ : Measure Ξ±) [OuterRegular ΞΌ] {Ξ΅ : ββ₯0β}
(hΞ΅ : Ξ΅ β 0) : β U, U β A β§ IsOpen U β§ ΞΌ U β€ ΞΌ A + Ξ΅ := by |
rcases eq_or_ne (ΞΌ A) β with (H | H)
Β· exact β¨univ, subset_univ _, isOpen_univ, by simp only [H, _root_.top_add, le_top]β©
Β· rcases A.exists_isOpen_lt_add H hΞ΅ with β¨U, AU, U_open, hUβ©
exact β¨U, AU, U_open, hU.leβ©
| 4 | 54.59815 | 2 | 1.444444 | 9 | 1,530 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
open Set Filter ENNReal Topology NNReal TopologicalSpace
namespace MeasureTheory
namespace Measure
def InnerRegularWRT {Ξ±} {_ : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (p q : Set Ξ± β Prop) :=
β β¦Uβ¦, q U β β r < ΞΌ U, β K, K β U β§ p K β§ r < ΞΌ K
#align measure_theory.measure.inner_regular MeasureTheory.Measure.InnerRegularWRT
variable {Ξ± Ξ² : Type*} [MeasurableSpace Ξ±] [TopologicalSpace Ξ±] {ΞΌ : Measure Ξ±}
class OuterRegular (ΞΌ : Measure Ξ±) : Prop where
protected outerRegular :
β β¦A : Set Ξ±β¦, MeasurableSet A β β r > ΞΌ A, β U, U β A β§ IsOpen U β§ ΞΌ U < r
#align measure_theory.measure.outer_regular MeasureTheory.Measure.OuterRegular
#align measure_theory.measure.outer_regular.outer_regular MeasureTheory.Measure.OuterRegular.outerRegular
class Regular (ΞΌ : Measure Ξ±) extends IsFiniteMeasureOnCompacts ΞΌ, OuterRegular ΞΌ : Prop where
innerRegular : InnerRegularWRT ΞΌ IsCompact IsOpen
#align measure_theory.measure.regular MeasureTheory.Measure.Regular
class WeaklyRegular (ΞΌ : Measure Ξ±) extends OuterRegular ΞΌ : Prop where
protected innerRegular : InnerRegularWRT ΞΌ IsClosed IsOpen
#align measure_theory.measure.weakly_regular MeasureTheory.Measure.WeaklyRegular
#align measure_theory.measure.weakly_regular.inner_regular MeasureTheory.Measure.WeaklyRegular.innerRegular
class InnerRegular (ΞΌ : Measure Ξ±) : Prop where
protected innerRegular : InnerRegularWRT ΞΌ IsCompact (fun s β¦ MeasurableSet s)
class InnerRegularCompactLTTop (ΞΌ : Measure Ξ±) : Prop where
protected innerRegular : InnerRegularWRT ΞΌ IsCompact (fun s β¦ MeasurableSet s β§ ΞΌ s β β)
-- see Note [lower instance priority]
instance (priority := 100) Regular.weaklyRegular [R1Space Ξ±] [Regular ΞΌ] :
WeaklyRegular ΞΌ where
innerRegular := fun _U hU r hr β¦
let β¨K, KU, K_comp, hKβ© := Regular.innerRegular hU r hr
β¨closure K, K_comp.closure_subset_of_isOpen hU KU, isClosed_closure,
hK.trans_le (measure_mono subset_closure)β©
#align measure_theory.measure.regular.weakly_regular MeasureTheory.Measure.Regular.weaklyRegular
namespace OuterRegular
instance zero : OuterRegular (0 : Measure Ξ±) :=
β¨fun A _ _r hr => β¨univ, subset_univ A, isOpen_univ, hrβ©β©
#align measure_theory.measure.outer_regular.zero MeasureTheory.Measure.OuterRegular.zero
theorem _root_.Set.exists_isOpen_lt_of_lt [OuterRegular ΞΌ] (A : Set Ξ±) (r : ββ₯0β) (hr : ΞΌ A < r) :
β U, U β A β§ IsOpen U β§ ΞΌ U < r := by
rcases OuterRegular.outerRegular (measurableSet_toMeasurable ΞΌ A) r
(by rwa [measure_toMeasurable]) with
β¨U, hAU, hUo, hUβ©
exact β¨U, (subset_toMeasurable _ _).trans hAU, hUo, hUβ©
#align set.exists_is_open_lt_of_lt Set.exists_isOpen_lt_of_lt
theorem _root_.Set.measure_eq_iInf_isOpen (A : Set Ξ±) (ΞΌ : Measure Ξ±) [OuterRegular ΞΌ] :
ΞΌ A = β¨
(U : Set Ξ±) (_ : A β U) (_ : IsOpen U), ΞΌ U := by
refine le_antisymm (le_iInfβ fun s hs => le_iInf fun _ => ΞΌ.mono hs) ?_
refine le_of_forall_lt' fun r hr => ?_
simpa only [iInf_lt_iff, exists_prop] using A.exists_isOpen_lt_of_lt r hr
#align set.measure_eq_infi_is_open Set.measure_eq_iInf_isOpen
theorem _root_.Set.exists_isOpen_lt_add [OuterRegular ΞΌ] (A : Set Ξ±) (hA : ΞΌ A β β) {Ξ΅ : ββ₯0β}
(hΞ΅ : Ξ΅ β 0) : β U, U β A β§ IsOpen U β§ ΞΌ U < ΞΌ A + Ξ΅ :=
A.exists_isOpen_lt_of_lt _ (ENNReal.lt_add_right hA hΞ΅)
#align set.exists_is_open_lt_add Set.exists_isOpen_lt_add
theorem _root_.Set.exists_isOpen_le_add (A : Set Ξ±) (ΞΌ : Measure Ξ±) [OuterRegular ΞΌ] {Ξ΅ : ββ₯0β}
(hΞ΅ : Ξ΅ β 0) : β U, U β A β§ IsOpen U β§ ΞΌ U β€ ΞΌ A + Ξ΅ := by
rcases eq_or_ne (ΞΌ A) β with (H | H)
Β· exact β¨univ, subset_univ _, isOpen_univ, by simp only [H, _root_.top_add, le_top]β©
Β· rcases A.exists_isOpen_lt_add H hΞ΅ with β¨U, AU, U_open, hUβ©
exact β¨U, AU, U_open, hU.leβ©
#align set.exists_is_open_le_add Set.exists_isOpen_le_add
| Mathlib/MeasureTheory/Measure/Regular.lean | 369 | 374 | theorem _root_.MeasurableSet.exists_isOpen_diff_lt [OuterRegular ΞΌ] {A : Set Ξ±}
(hA : MeasurableSet A) (hA' : ΞΌ A β β) {Ξ΅ : ββ₯0β} (hΞ΅ : Ξ΅ β 0) :
β U, U β A β§ IsOpen U β§ ΞΌ U < β β§ ΞΌ (U \ A) < Ξ΅ := by |
rcases A.exists_isOpen_lt_add hA' hΞ΅ with β¨U, hAU, hUo, hUβ©
use U, hAU, hUo, hU.trans_le le_top
exact measure_diff_lt_of_lt_add hA hAU hA' hU
| 3 | 20.085537 | 1 | 1.444444 | 9 | 1,530 |
import Mathlib.Probability.IdentDistrib
import Mathlib.MeasureTheory.Integral.DominatedConvergence
import Mathlib.Analysis.SpecificLimits.FloorPow
import Mathlib.Analysis.PSeries
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
#align_import probability.strong_law from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open MeasureTheory Filter Finset Asymptotics
open Set (indicator)
open scoped Topology MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
section Truncation
variable {Ξ± : Type*}
def truncation (f : Ξ± β β) (A : β) :=
indicator (Set.Ioc (-A) A) id β f
#align probability_theory.truncation ProbabilityTheory.truncation
variable {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {f : Ξ± β β}
| Mathlib/Probability/StrongLaw.lean | 82 | 85 | theorem _root_.MeasureTheory.AEStronglyMeasurable.truncation (hf : AEStronglyMeasurable f ΞΌ)
{A : β} : AEStronglyMeasurable (truncation f A) ΞΌ := by |
apply AEStronglyMeasurable.comp_aemeasurable _ hf.aemeasurable
exact (stronglyMeasurable_id.indicator measurableSet_Ioc).aestronglyMeasurable
| 2 | 7.389056 | 1 | 1.444444 | 9 | 1,531 |
import Mathlib.Probability.IdentDistrib
import Mathlib.MeasureTheory.Integral.DominatedConvergence
import Mathlib.Analysis.SpecificLimits.FloorPow
import Mathlib.Analysis.PSeries
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
#align_import probability.strong_law from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open MeasureTheory Filter Finset Asymptotics
open Set (indicator)
open scoped Topology MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
section Truncation
variable {Ξ± : Type*}
def truncation (f : Ξ± β β) (A : β) :=
indicator (Set.Ioc (-A) A) id β f
#align probability_theory.truncation ProbabilityTheory.truncation
variable {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {f : Ξ± β β}
theorem _root_.MeasureTheory.AEStronglyMeasurable.truncation (hf : AEStronglyMeasurable f ΞΌ)
{A : β} : AEStronglyMeasurable (truncation f A) ΞΌ := by
apply AEStronglyMeasurable.comp_aemeasurable _ hf.aemeasurable
exact (stronglyMeasurable_id.indicator measurableSet_Ioc).aestronglyMeasurable
#align measure_theory.ae_strongly_measurable.truncation MeasureTheory.AEStronglyMeasurable.truncation
| Mathlib/Probability/StrongLaw.lean | 88 | 92 | theorem abs_truncation_le_bound (f : Ξ± β β) (A : β) (x : Ξ±) : |truncation f A x| β€ |A| := by |
simp only [truncation, Set.indicator, Set.mem_Icc, id, Function.comp_apply]
split_ifs with h
Β· exact abs_le_abs h.2 (neg_le.2 h.1.le)
Β· simp [abs_nonneg]
| 4 | 54.59815 | 2 | 1.444444 | 9 | 1,531 |
import Mathlib.Probability.IdentDistrib
import Mathlib.MeasureTheory.Integral.DominatedConvergence
import Mathlib.Analysis.SpecificLimits.FloorPow
import Mathlib.Analysis.PSeries
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
#align_import probability.strong_law from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open MeasureTheory Filter Finset Asymptotics
open Set (indicator)
open scoped Topology MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
section Truncation
variable {Ξ± : Type*}
def truncation (f : Ξ± β β) (A : β) :=
indicator (Set.Ioc (-A) A) id β f
#align probability_theory.truncation ProbabilityTheory.truncation
variable {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {f : Ξ± β β}
theorem _root_.MeasureTheory.AEStronglyMeasurable.truncation (hf : AEStronglyMeasurable f ΞΌ)
{A : β} : AEStronglyMeasurable (truncation f A) ΞΌ := by
apply AEStronglyMeasurable.comp_aemeasurable _ hf.aemeasurable
exact (stronglyMeasurable_id.indicator measurableSet_Ioc).aestronglyMeasurable
#align measure_theory.ae_strongly_measurable.truncation MeasureTheory.AEStronglyMeasurable.truncation
theorem abs_truncation_le_bound (f : Ξ± β β) (A : β) (x : Ξ±) : |truncation f A x| β€ |A| := by
simp only [truncation, Set.indicator, Set.mem_Icc, id, Function.comp_apply]
split_ifs with h
Β· exact abs_le_abs h.2 (neg_le.2 h.1.le)
Β· simp [abs_nonneg]
#align probability_theory.abs_truncation_le_bound ProbabilityTheory.abs_truncation_le_bound
@[simp]
| Mathlib/Probability/StrongLaw.lean | 96 | 96 | theorem truncation_zero (f : Ξ± β β) : truncation f 0 = 0 := by | simp [truncation]; rfl
| 1 | 2.718282 | 0 | 1.444444 | 9 | 1,531 |
import Mathlib.Probability.IdentDistrib
import Mathlib.MeasureTheory.Integral.DominatedConvergence
import Mathlib.Analysis.SpecificLimits.FloorPow
import Mathlib.Analysis.PSeries
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
#align_import probability.strong_law from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open MeasureTheory Filter Finset Asymptotics
open Set (indicator)
open scoped Topology MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
section Truncation
variable {Ξ± : Type*}
def truncation (f : Ξ± β β) (A : β) :=
indicator (Set.Ioc (-A) A) id β f
#align probability_theory.truncation ProbabilityTheory.truncation
variable {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {f : Ξ± β β}
theorem _root_.MeasureTheory.AEStronglyMeasurable.truncation (hf : AEStronglyMeasurable f ΞΌ)
{A : β} : AEStronglyMeasurable (truncation f A) ΞΌ := by
apply AEStronglyMeasurable.comp_aemeasurable _ hf.aemeasurable
exact (stronglyMeasurable_id.indicator measurableSet_Ioc).aestronglyMeasurable
#align measure_theory.ae_strongly_measurable.truncation MeasureTheory.AEStronglyMeasurable.truncation
theorem abs_truncation_le_bound (f : Ξ± β β) (A : β) (x : Ξ±) : |truncation f A x| β€ |A| := by
simp only [truncation, Set.indicator, Set.mem_Icc, id, Function.comp_apply]
split_ifs with h
Β· exact abs_le_abs h.2 (neg_le.2 h.1.le)
Β· simp [abs_nonneg]
#align probability_theory.abs_truncation_le_bound ProbabilityTheory.abs_truncation_le_bound
@[simp]
theorem truncation_zero (f : Ξ± β β) : truncation f 0 = 0 := by simp [truncation]; rfl
#align probability_theory.truncation_zero ProbabilityTheory.truncation_zero
| Mathlib/Probability/StrongLaw.lean | 99 | 103 | theorem abs_truncation_le_abs_self (f : Ξ± β β) (A : β) (x : Ξ±) : |truncation f A x| β€ |f x| := by |
simp only [truncation, indicator, Set.mem_Icc, id, Function.comp_apply]
split_ifs
Β· exact le_rfl
Β· simp [abs_nonneg]
| 4 | 54.59815 | 2 | 1.444444 | 9 | 1,531 |
import Mathlib.Probability.IdentDistrib
import Mathlib.MeasureTheory.Integral.DominatedConvergence
import Mathlib.Analysis.SpecificLimits.FloorPow
import Mathlib.Analysis.PSeries
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
#align_import probability.strong_law from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open MeasureTheory Filter Finset Asymptotics
open Set (indicator)
open scoped Topology MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
section Truncation
variable {Ξ± : Type*}
def truncation (f : Ξ± β β) (A : β) :=
indicator (Set.Ioc (-A) A) id β f
#align probability_theory.truncation ProbabilityTheory.truncation
variable {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {f : Ξ± β β}
theorem _root_.MeasureTheory.AEStronglyMeasurable.truncation (hf : AEStronglyMeasurable f ΞΌ)
{A : β} : AEStronglyMeasurable (truncation f A) ΞΌ := by
apply AEStronglyMeasurable.comp_aemeasurable _ hf.aemeasurable
exact (stronglyMeasurable_id.indicator measurableSet_Ioc).aestronglyMeasurable
#align measure_theory.ae_strongly_measurable.truncation MeasureTheory.AEStronglyMeasurable.truncation
theorem abs_truncation_le_bound (f : Ξ± β β) (A : β) (x : Ξ±) : |truncation f A x| β€ |A| := by
simp only [truncation, Set.indicator, Set.mem_Icc, id, Function.comp_apply]
split_ifs with h
Β· exact abs_le_abs h.2 (neg_le.2 h.1.le)
Β· simp [abs_nonneg]
#align probability_theory.abs_truncation_le_bound ProbabilityTheory.abs_truncation_le_bound
@[simp]
theorem truncation_zero (f : Ξ± β β) : truncation f 0 = 0 := by simp [truncation]; rfl
#align probability_theory.truncation_zero ProbabilityTheory.truncation_zero
theorem abs_truncation_le_abs_self (f : Ξ± β β) (A : β) (x : Ξ±) : |truncation f A x| β€ |f x| := by
simp only [truncation, indicator, Set.mem_Icc, id, Function.comp_apply]
split_ifs
Β· exact le_rfl
Β· simp [abs_nonneg]
#align probability_theory.abs_truncation_le_abs_self ProbabilityTheory.abs_truncation_le_abs_self
| Mathlib/Probability/StrongLaw.lean | 106 | 111 | theorem truncation_eq_self {f : Ξ± β β} {A : β} {x : Ξ±} (h : |f x| < A) :
truncation f A x = f x := by |
simp only [truncation, indicator, Set.mem_Icc, id, Function.comp_apply, ite_eq_left_iff]
intro H
apply H.elim
simp [(abs_lt.1 h).1, (abs_lt.1 h).2.le]
| 4 | 54.59815 | 2 | 1.444444 | 9 | 1,531 |
import Mathlib.Probability.IdentDistrib
import Mathlib.MeasureTheory.Integral.DominatedConvergence
import Mathlib.Analysis.SpecificLimits.FloorPow
import Mathlib.Analysis.PSeries
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
#align_import probability.strong_law from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open MeasureTheory Filter Finset Asymptotics
open Set (indicator)
open scoped Topology MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
section Truncation
variable {Ξ± : Type*}
def truncation (f : Ξ± β β) (A : β) :=
indicator (Set.Ioc (-A) A) id β f
#align probability_theory.truncation ProbabilityTheory.truncation
variable {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {f : Ξ± β β}
theorem _root_.MeasureTheory.AEStronglyMeasurable.truncation (hf : AEStronglyMeasurable f ΞΌ)
{A : β} : AEStronglyMeasurable (truncation f A) ΞΌ := by
apply AEStronglyMeasurable.comp_aemeasurable _ hf.aemeasurable
exact (stronglyMeasurable_id.indicator measurableSet_Ioc).aestronglyMeasurable
#align measure_theory.ae_strongly_measurable.truncation MeasureTheory.AEStronglyMeasurable.truncation
theorem abs_truncation_le_bound (f : Ξ± β β) (A : β) (x : Ξ±) : |truncation f A x| β€ |A| := by
simp only [truncation, Set.indicator, Set.mem_Icc, id, Function.comp_apply]
split_ifs with h
Β· exact abs_le_abs h.2 (neg_le.2 h.1.le)
Β· simp [abs_nonneg]
#align probability_theory.abs_truncation_le_bound ProbabilityTheory.abs_truncation_le_bound
@[simp]
theorem truncation_zero (f : Ξ± β β) : truncation f 0 = 0 := by simp [truncation]; rfl
#align probability_theory.truncation_zero ProbabilityTheory.truncation_zero
theorem abs_truncation_le_abs_self (f : Ξ± β β) (A : β) (x : Ξ±) : |truncation f A x| β€ |f x| := by
simp only [truncation, indicator, Set.mem_Icc, id, Function.comp_apply]
split_ifs
Β· exact le_rfl
Β· simp [abs_nonneg]
#align probability_theory.abs_truncation_le_abs_self ProbabilityTheory.abs_truncation_le_abs_self
theorem truncation_eq_self {f : Ξ± β β} {A : β} {x : Ξ±} (h : |f x| < A) :
truncation f A x = f x := by
simp only [truncation, indicator, Set.mem_Icc, id, Function.comp_apply, ite_eq_left_iff]
intro H
apply H.elim
simp [(abs_lt.1 h).1, (abs_lt.1 h).2.le]
#align probability_theory.truncation_eq_self ProbabilityTheory.truncation_eq_self
| Mathlib/Probability/StrongLaw.lean | 114 | 123 | theorem truncation_eq_of_nonneg {f : Ξ± β β} {A : β} (h : β x, 0 β€ f x) :
truncation f A = indicator (Set.Ioc 0 A) id β f := by |
ext x
rcases (h x).lt_or_eq with (hx | hx)
Β· simp only [truncation, indicator, hx, Set.mem_Ioc, id, Function.comp_apply, true_and_iff]
by_cases h'x : f x β€ A
Β· have : -A < f x := by linarith [h x]
simp only [this, true_and_iff]
Β· simp only [h'x, and_false_iff]
Β· simp only [truncation, indicator, hx, id, Function.comp_apply, ite_self]
| 8 | 2,980.957987 | 2 | 1.444444 | 9 | 1,531 |
import Mathlib.Probability.IdentDistrib
import Mathlib.MeasureTheory.Integral.DominatedConvergence
import Mathlib.Analysis.SpecificLimits.FloorPow
import Mathlib.Analysis.PSeries
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
#align_import probability.strong_law from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open MeasureTheory Filter Finset Asymptotics
open Set (indicator)
open scoped Topology MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
section Truncation
variable {Ξ± : Type*}
def truncation (f : Ξ± β β) (A : β) :=
indicator (Set.Ioc (-A) A) id β f
#align probability_theory.truncation ProbabilityTheory.truncation
variable {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {f : Ξ± β β}
theorem _root_.MeasureTheory.AEStronglyMeasurable.truncation (hf : AEStronglyMeasurable f ΞΌ)
{A : β} : AEStronglyMeasurable (truncation f A) ΞΌ := by
apply AEStronglyMeasurable.comp_aemeasurable _ hf.aemeasurable
exact (stronglyMeasurable_id.indicator measurableSet_Ioc).aestronglyMeasurable
#align measure_theory.ae_strongly_measurable.truncation MeasureTheory.AEStronglyMeasurable.truncation
theorem abs_truncation_le_bound (f : Ξ± β β) (A : β) (x : Ξ±) : |truncation f A x| β€ |A| := by
simp only [truncation, Set.indicator, Set.mem_Icc, id, Function.comp_apply]
split_ifs with h
Β· exact abs_le_abs h.2 (neg_le.2 h.1.le)
Β· simp [abs_nonneg]
#align probability_theory.abs_truncation_le_bound ProbabilityTheory.abs_truncation_le_bound
@[simp]
theorem truncation_zero (f : Ξ± β β) : truncation f 0 = 0 := by simp [truncation]; rfl
#align probability_theory.truncation_zero ProbabilityTheory.truncation_zero
theorem abs_truncation_le_abs_self (f : Ξ± β β) (A : β) (x : Ξ±) : |truncation f A x| β€ |f x| := by
simp only [truncation, indicator, Set.mem_Icc, id, Function.comp_apply]
split_ifs
Β· exact le_rfl
Β· simp [abs_nonneg]
#align probability_theory.abs_truncation_le_abs_self ProbabilityTheory.abs_truncation_le_abs_self
theorem truncation_eq_self {f : Ξ± β β} {A : β} {x : Ξ±} (h : |f x| < A) :
truncation f A x = f x := by
simp only [truncation, indicator, Set.mem_Icc, id, Function.comp_apply, ite_eq_left_iff]
intro H
apply H.elim
simp [(abs_lt.1 h).1, (abs_lt.1 h).2.le]
#align probability_theory.truncation_eq_self ProbabilityTheory.truncation_eq_self
theorem truncation_eq_of_nonneg {f : Ξ± β β} {A : β} (h : β x, 0 β€ f x) :
truncation f A = indicator (Set.Ioc 0 A) id β f := by
ext x
rcases (h x).lt_or_eq with (hx | hx)
Β· simp only [truncation, indicator, hx, Set.mem_Ioc, id, Function.comp_apply, true_and_iff]
by_cases h'x : f x β€ A
Β· have : -A < f x := by linarith [h x]
simp only [this, true_and_iff]
Β· simp only [h'x, and_false_iff]
Β· simp only [truncation, indicator, hx, id, Function.comp_apply, ite_self]
#align probability_theory.truncation_eq_of_nonneg ProbabilityTheory.truncation_eq_of_nonneg
theorem truncation_nonneg {f : Ξ± β β} (A : β) {x : Ξ±} (h : 0 β€ f x) : 0 β€ truncation f A x :=
Set.indicator_apply_nonneg fun _ => h
#align probability_theory.truncation_nonneg ProbabilityTheory.truncation_nonneg
theorem _root_.MeasureTheory.AEStronglyMeasurable.memβp_truncation [IsFiniteMeasure ΞΌ]
(hf : AEStronglyMeasurable f ΞΌ) {A : β} {p : ββ₯0β} : Memβp (truncation f A) p ΞΌ :=
Memβp.of_bound hf.truncation |A| (eventually_of_forall fun _ => abs_truncation_le_bound _ _ _)
#align measure_theory.ae_strongly_measurable.mem_βp_truncation MeasureTheory.AEStronglyMeasurable.memβp_truncation
| Mathlib/Probability/StrongLaw.lean | 135 | 137 | theorem _root_.MeasureTheory.AEStronglyMeasurable.integrable_truncation [IsFiniteMeasure ΞΌ]
(hf : AEStronglyMeasurable f ΞΌ) {A : β} : Integrable (truncation f A) ΞΌ := by |
rw [β memβp_one_iff_integrable]; exact hf.memβp_truncation
| 1 | 2.718282 | 0 | 1.444444 | 9 | 1,531 |
import Mathlib.Probability.IdentDistrib
import Mathlib.MeasureTheory.Integral.DominatedConvergence
import Mathlib.Analysis.SpecificLimits.FloorPow
import Mathlib.Analysis.PSeries
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
#align_import probability.strong_law from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open MeasureTheory Filter Finset Asymptotics
open Set (indicator)
open scoped Topology MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
section Truncation
variable {Ξ± : Type*}
def truncation (f : Ξ± β β) (A : β) :=
indicator (Set.Ioc (-A) A) id β f
#align probability_theory.truncation ProbabilityTheory.truncation
variable {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {f : Ξ± β β}
theorem _root_.MeasureTheory.AEStronglyMeasurable.truncation (hf : AEStronglyMeasurable f ΞΌ)
{A : β} : AEStronglyMeasurable (truncation f A) ΞΌ := by
apply AEStronglyMeasurable.comp_aemeasurable _ hf.aemeasurable
exact (stronglyMeasurable_id.indicator measurableSet_Ioc).aestronglyMeasurable
#align measure_theory.ae_strongly_measurable.truncation MeasureTheory.AEStronglyMeasurable.truncation
theorem abs_truncation_le_bound (f : Ξ± β β) (A : β) (x : Ξ±) : |truncation f A x| β€ |A| := by
simp only [truncation, Set.indicator, Set.mem_Icc, id, Function.comp_apply]
split_ifs with h
Β· exact abs_le_abs h.2 (neg_le.2 h.1.le)
Β· simp [abs_nonneg]
#align probability_theory.abs_truncation_le_bound ProbabilityTheory.abs_truncation_le_bound
@[simp]
theorem truncation_zero (f : Ξ± β β) : truncation f 0 = 0 := by simp [truncation]; rfl
#align probability_theory.truncation_zero ProbabilityTheory.truncation_zero
theorem abs_truncation_le_abs_self (f : Ξ± β β) (A : β) (x : Ξ±) : |truncation f A x| β€ |f x| := by
simp only [truncation, indicator, Set.mem_Icc, id, Function.comp_apply]
split_ifs
Β· exact le_rfl
Β· simp [abs_nonneg]
#align probability_theory.abs_truncation_le_abs_self ProbabilityTheory.abs_truncation_le_abs_self
theorem truncation_eq_self {f : Ξ± β β} {A : β} {x : Ξ±} (h : |f x| < A) :
truncation f A x = f x := by
simp only [truncation, indicator, Set.mem_Icc, id, Function.comp_apply, ite_eq_left_iff]
intro H
apply H.elim
simp [(abs_lt.1 h).1, (abs_lt.1 h).2.le]
#align probability_theory.truncation_eq_self ProbabilityTheory.truncation_eq_self
theorem truncation_eq_of_nonneg {f : Ξ± β β} {A : β} (h : β x, 0 β€ f x) :
truncation f A = indicator (Set.Ioc 0 A) id β f := by
ext x
rcases (h x).lt_or_eq with (hx | hx)
Β· simp only [truncation, indicator, hx, Set.mem_Ioc, id, Function.comp_apply, true_and_iff]
by_cases h'x : f x β€ A
Β· have : -A < f x := by linarith [h x]
simp only [this, true_and_iff]
Β· simp only [h'x, and_false_iff]
Β· simp only [truncation, indicator, hx, id, Function.comp_apply, ite_self]
#align probability_theory.truncation_eq_of_nonneg ProbabilityTheory.truncation_eq_of_nonneg
theorem truncation_nonneg {f : Ξ± β β} (A : β) {x : Ξ±} (h : 0 β€ f x) : 0 β€ truncation f A x :=
Set.indicator_apply_nonneg fun _ => h
#align probability_theory.truncation_nonneg ProbabilityTheory.truncation_nonneg
theorem _root_.MeasureTheory.AEStronglyMeasurable.memβp_truncation [IsFiniteMeasure ΞΌ]
(hf : AEStronglyMeasurable f ΞΌ) {A : β} {p : ββ₯0β} : Memβp (truncation f A) p ΞΌ :=
Memβp.of_bound hf.truncation |A| (eventually_of_forall fun _ => abs_truncation_le_bound _ _ _)
#align measure_theory.ae_strongly_measurable.mem_βp_truncation MeasureTheory.AEStronglyMeasurable.memβp_truncation
theorem _root_.MeasureTheory.AEStronglyMeasurable.integrable_truncation [IsFiniteMeasure ΞΌ]
(hf : AEStronglyMeasurable f ΞΌ) {A : β} : Integrable (truncation f A) ΞΌ := by
rw [β memβp_one_iff_integrable]; exact hf.memβp_truncation
#align measure_theory.ae_strongly_measurable.integrable_truncation MeasureTheory.AEStronglyMeasurable.integrable_truncation
| Mathlib/Probability/StrongLaw.lean | 140 | 148 | theorem moment_truncation_eq_intervalIntegral (hf : AEStronglyMeasurable f ΞΌ) {A : β} (hA : 0 β€ A)
{n : β} (hn : n β 0) : β« x, truncation f A x ^ n βΞΌ = β« y in -A..A, y ^ n βMeasure.map f ΞΌ := by |
have M : MeasurableSet (Set.Ioc (-A) A) := measurableSet_Ioc
change β« x, (fun z => indicator (Set.Ioc (-A) A) id z ^ n) (f x) βΞΌ = _
rw [β integral_map (f := fun z => _ ^ n) hf.aemeasurable, intervalIntegral.integral_of_le,
β integral_indicator M]
Β· simp only [indicator, zero_pow hn, id, ite_pow]
Β· linarith
Β· exact ((measurable_id.indicator M).pow_const n).aestronglyMeasurable
| 7 | 1,096.633158 | 2 | 1.444444 | 9 | 1,531 |
import Mathlib.Probability.IdentDistrib
import Mathlib.MeasureTheory.Integral.DominatedConvergence
import Mathlib.Analysis.SpecificLimits.FloorPow
import Mathlib.Analysis.PSeries
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
#align_import probability.strong_law from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open MeasureTheory Filter Finset Asymptotics
open Set (indicator)
open scoped Topology MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
section Truncation
variable {Ξ± : Type*}
def truncation (f : Ξ± β β) (A : β) :=
indicator (Set.Ioc (-A) A) id β f
#align probability_theory.truncation ProbabilityTheory.truncation
variable {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {f : Ξ± β β}
theorem _root_.MeasureTheory.AEStronglyMeasurable.truncation (hf : AEStronglyMeasurable f ΞΌ)
{A : β} : AEStronglyMeasurable (truncation f A) ΞΌ := by
apply AEStronglyMeasurable.comp_aemeasurable _ hf.aemeasurable
exact (stronglyMeasurable_id.indicator measurableSet_Ioc).aestronglyMeasurable
#align measure_theory.ae_strongly_measurable.truncation MeasureTheory.AEStronglyMeasurable.truncation
theorem abs_truncation_le_bound (f : Ξ± β β) (A : β) (x : Ξ±) : |truncation f A x| β€ |A| := by
simp only [truncation, Set.indicator, Set.mem_Icc, id, Function.comp_apply]
split_ifs with h
Β· exact abs_le_abs h.2 (neg_le.2 h.1.le)
Β· simp [abs_nonneg]
#align probability_theory.abs_truncation_le_bound ProbabilityTheory.abs_truncation_le_bound
@[simp]
theorem truncation_zero (f : Ξ± β β) : truncation f 0 = 0 := by simp [truncation]; rfl
#align probability_theory.truncation_zero ProbabilityTheory.truncation_zero
theorem abs_truncation_le_abs_self (f : Ξ± β β) (A : β) (x : Ξ±) : |truncation f A x| β€ |f x| := by
simp only [truncation, indicator, Set.mem_Icc, id, Function.comp_apply]
split_ifs
Β· exact le_rfl
Β· simp [abs_nonneg]
#align probability_theory.abs_truncation_le_abs_self ProbabilityTheory.abs_truncation_le_abs_self
theorem truncation_eq_self {f : Ξ± β β} {A : β} {x : Ξ±} (h : |f x| < A) :
truncation f A x = f x := by
simp only [truncation, indicator, Set.mem_Icc, id, Function.comp_apply, ite_eq_left_iff]
intro H
apply H.elim
simp [(abs_lt.1 h).1, (abs_lt.1 h).2.le]
#align probability_theory.truncation_eq_self ProbabilityTheory.truncation_eq_self
theorem truncation_eq_of_nonneg {f : Ξ± β β} {A : β} (h : β x, 0 β€ f x) :
truncation f A = indicator (Set.Ioc 0 A) id β f := by
ext x
rcases (h x).lt_or_eq with (hx | hx)
Β· simp only [truncation, indicator, hx, Set.mem_Ioc, id, Function.comp_apply, true_and_iff]
by_cases h'x : f x β€ A
Β· have : -A < f x := by linarith [h x]
simp only [this, true_and_iff]
Β· simp only [h'x, and_false_iff]
Β· simp only [truncation, indicator, hx, id, Function.comp_apply, ite_self]
#align probability_theory.truncation_eq_of_nonneg ProbabilityTheory.truncation_eq_of_nonneg
theorem truncation_nonneg {f : Ξ± β β} (A : β) {x : Ξ±} (h : 0 β€ f x) : 0 β€ truncation f A x :=
Set.indicator_apply_nonneg fun _ => h
#align probability_theory.truncation_nonneg ProbabilityTheory.truncation_nonneg
theorem _root_.MeasureTheory.AEStronglyMeasurable.memβp_truncation [IsFiniteMeasure ΞΌ]
(hf : AEStronglyMeasurable f ΞΌ) {A : β} {p : ββ₯0β} : Memβp (truncation f A) p ΞΌ :=
Memβp.of_bound hf.truncation |A| (eventually_of_forall fun _ => abs_truncation_le_bound _ _ _)
#align measure_theory.ae_strongly_measurable.mem_βp_truncation MeasureTheory.AEStronglyMeasurable.memβp_truncation
theorem _root_.MeasureTheory.AEStronglyMeasurable.integrable_truncation [IsFiniteMeasure ΞΌ]
(hf : AEStronglyMeasurable f ΞΌ) {A : β} : Integrable (truncation f A) ΞΌ := by
rw [β memβp_one_iff_integrable]; exact hf.memβp_truncation
#align measure_theory.ae_strongly_measurable.integrable_truncation MeasureTheory.AEStronglyMeasurable.integrable_truncation
theorem moment_truncation_eq_intervalIntegral (hf : AEStronglyMeasurable f ΞΌ) {A : β} (hA : 0 β€ A)
{n : β} (hn : n β 0) : β« x, truncation f A x ^ n βΞΌ = β« y in -A..A, y ^ n βMeasure.map f ΞΌ := by
have M : MeasurableSet (Set.Ioc (-A) A) := measurableSet_Ioc
change β« x, (fun z => indicator (Set.Ioc (-A) A) id z ^ n) (f x) βΞΌ = _
rw [β integral_map (f := fun z => _ ^ n) hf.aemeasurable, intervalIntegral.integral_of_le,
β integral_indicator M]
Β· simp only [indicator, zero_pow hn, id, ite_pow]
Β· linarith
Β· exact ((measurable_id.indicator M).pow_const n).aestronglyMeasurable
#align probability_theory.moment_truncation_eq_interval_integral ProbabilityTheory.moment_truncation_eq_intervalIntegral
| Mathlib/Probability/StrongLaw.lean | 151 | 175 | theorem moment_truncation_eq_intervalIntegral_of_nonneg (hf : AEStronglyMeasurable f ΞΌ) {A : β}
{n : β} (hn : n β 0) (h'f : 0 β€ f) :
β« x, truncation f A x ^ n βΞΌ = β« y in (0)..A, y ^ n βMeasure.map f ΞΌ := by |
have M : MeasurableSet (Set.Ioc 0 A) := measurableSet_Ioc
have M' : MeasurableSet (Set.Ioc A 0) := measurableSet_Ioc
rw [truncation_eq_of_nonneg h'f]
change β« x, (fun z => indicator (Set.Ioc 0 A) id z ^ n) (f x) βΞΌ = _
rcases le_or_lt 0 A with (hA | hA)
Β· rw [β integral_map (f := fun z => _ ^ n) hf.aemeasurable, intervalIntegral.integral_of_le hA,
β integral_indicator M]
Β· simp only [indicator, zero_pow hn, id, ite_pow]
Β· exact ((measurable_id.indicator M).pow_const n).aestronglyMeasurable
Β· rw [β integral_map (f := fun z => _ ^ n) hf.aemeasurable, intervalIntegral.integral_of_ge hA.le,
β integral_indicator M']
Β· simp only [Set.Ioc_eq_empty_of_le hA.le, zero_pow hn, Set.indicator_empty, integral_zero,
zero_eq_neg]
apply integral_eq_zero_of_ae
have : βα΅ x βMeasure.map f ΞΌ, (0 : β) β€ x :=
(ae_map_iff hf.aemeasurable measurableSet_Ici).2 (eventually_of_forall h'f)
filter_upwards [this] with x hx
simp only [indicator, Set.mem_Ioc, Pi.zero_apply, ite_eq_right_iff, and_imp]
intro _ h''x
have : x = 0 := by linarith
simp [this, zero_pow hn]
Β· exact ((measurable_id.indicator M).pow_const n).aestronglyMeasurable
| 22 | 3,584,912,846.131591 | 2 | 1.444444 | 9 | 1,531 |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Tactic.Ring
#align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
def hyperoperation : β β β β β β β
| 0, _, k => k + 1
| 1, m, 0 => m
| 2, _, 0 => 0
| _ + 3, _, 0 => 1
| n + 1, m, k + 1 => hyperoperation n m (hyperoperation (n + 1) m k)
#align hyperoperation hyperoperation
-- Basic hyperoperation lemmas
@[simp]
theorem hyperoperation_zero (m : β) : hyperoperation 0 m = Nat.succ :=
funext fun k => by rw [hyperoperation, Nat.succ_eq_add_one]
#align hyperoperation_zero hyperoperation_zero
| Mathlib/Data/Nat/Hyperoperation.lean | 49 | 50 | theorem hyperoperation_ge_three_eq_one (n m : β) : hyperoperation (n + 3) m 0 = 1 := by |
rw [hyperoperation]
| 1 | 2.718282 | 0 | 1.444444 | 9 | 1,532 |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Tactic.Ring
#align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
def hyperoperation : β β β β β β β
| 0, _, k => k + 1
| 1, m, 0 => m
| 2, _, 0 => 0
| _ + 3, _, 0 => 1
| n + 1, m, k + 1 => hyperoperation n m (hyperoperation (n + 1) m k)
#align hyperoperation hyperoperation
-- Basic hyperoperation lemmas
@[simp]
theorem hyperoperation_zero (m : β) : hyperoperation 0 m = Nat.succ :=
funext fun k => by rw [hyperoperation, Nat.succ_eq_add_one]
#align hyperoperation_zero hyperoperation_zero
theorem hyperoperation_ge_three_eq_one (n m : β) : hyperoperation (n + 3) m 0 = 1 := by
rw [hyperoperation]
#align hyperoperation_ge_three_eq_one hyperoperation_ge_three_eq_one
| Mathlib/Data/Nat/Hyperoperation.lean | 53 | 55 | theorem hyperoperation_recursion (n m k : β) :
hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k) := by |
rw [hyperoperation]
| 1 | 2.718282 | 0 | 1.444444 | 9 | 1,532 |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Tactic.Ring
#align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
def hyperoperation : β β β β β β β
| 0, _, k => k + 1
| 1, m, 0 => m
| 2, _, 0 => 0
| _ + 3, _, 0 => 1
| n + 1, m, k + 1 => hyperoperation n m (hyperoperation (n + 1) m k)
#align hyperoperation hyperoperation
-- Basic hyperoperation lemmas
@[simp]
theorem hyperoperation_zero (m : β) : hyperoperation 0 m = Nat.succ :=
funext fun k => by rw [hyperoperation, Nat.succ_eq_add_one]
#align hyperoperation_zero hyperoperation_zero
theorem hyperoperation_ge_three_eq_one (n m : β) : hyperoperation (n + 3) m 0 = 1 := by
rw [hyperoperation]
#align hyperoperation_ge_three_eq_one hyperoperation_ge_three_eq_one
theorem hyperoperation_recursion (n m k : β) :
hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k) := by
rw [hyperoperation]
#align hyperoperation_recursion hyperoperation_recursion
-- Interesting hyperoperation lemmas
@[simp]
| Mathlib/Data/Nat/Hyperoperation.lean | 60 | 65 | theorem hyperoperation_one : hyperoperation 1 = (Β· + Β·) := by |
ext m k
induction' k with bn bih
Β· rw [Nat.add_zero m, hyperoperation]
Β· rw [hyperoperation_recursion, bih, hyperoperation_zero]
exact Nat.add_assoc m bn 1
| 5 | 148.413159 | 2 | 1.444444 | 9 | 1,532 |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Tactic.Ring
#align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
def hyperoperation : β β β β β β β
| 0, _, k => k + 1
| 1, m, 0 => m
| 2, _, 0 => 0
| _ + 3, _, 0 => 1
| n + 1, m, k + 1 => hyperoperation n m (hyperoperation (n + 1) m k)
#align hyperoperation hyperoperation
-- Basic hyperoperation lemmas
@[simp]
theorem hyperoperation_zero (m : β) : hyperoperation 0 m = Nat.succ :=
funext fun k => by rw [hyperoperation, Nat.succ_eq_add_one]
#align hyperoperation_zero hyperoperation_zero
theorem hyperoperation_ge_three_eq_one (n m : β) : hyperoperation (n + 3) m 0 = 1 := by
rw [hyperoperation]
#align hyperoperation_ge_three_eq_one hyperoperation_ge_three_eq_one
theorem hyperoperation_recursion (n m k : β) :
hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k) := by
rw [hyperoperation]
#align hyperoperation_recursion hyperoperation_recursion
-- Interesting hyperoperation lemmas
@[simp]
theorem hyperoperation_one : hyperoperation 1 = (Β· + Β·) := by
ext m k
induction' k with bn bih
Β· rw [Nat.add_zero m, hyperoperation]
Β· rw [hyperoperation_recursion, bih, hyperoperation_zero]
exact Nat.add_assoc m bn 1
#align hyperoperation_one hyperoperation_one
@[simp]
| Mathlib/Data/Nat/Hyperoperation.lean | 69 | 78 | theorem hyperoperation_two : hyperoperation 2 = (Β· * Β·) := by |
ext m k
induction' k with bn bih
Β· rw [hyperoperation]
exact (Nat.mul_zero m).symm
Β· rw [hyperoperation_recursion, hyperoperation_one, bih]
-- Porting note: was `ring`
dsimp only
nth_rewrite 1 [β mul_one m]
rw [β mul_add, add_comm]
| 9 | 8,103.083928 | 2 | 1.444444 | 9 | 1,532 |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Tactic.Ring
#align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
def hyperoperation : β β β β β β β
| 0, _, k => k + 1
| 1, m, 0 => m
| 2, _, 0 => 0
| _ + 3, _, 0 => 1
| n + 1, m, k + 1 => hyperoperation n m (hyperoperation (n + 1) m k)
#align hyperoperation hyperoperation
-- Basic hyperoperation lemmas
@[simp]
theorem hyperoperation_zero (m : β) : hyperoperation 0 m = Nat.succ :=
funext fun k => by rw [hyperoperation, Nat.succ_eq_add_one]
#align hyperoperation_zero hyperoperation_zero
theorem hyperoperation_ge_three_eq_one (n m : β) : hyperoperation (n + 3) m 0 = 1 := by
rw [hyperoperation]
#align hyperoperation_ge_three_eq_one hyperoperation_ge_three_eq_one
theorem hyperoperation_recursion (n m k : β) :
hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k) := by
rw [hyperoperation]
#align hyperoperation_recursion hyperoperation_recursion
-- Interesting hyperoperation lemmas
@[simp]
theorem hyperoperation_one : hyperoperation 1 = (Β· + Β·) := by
ext m k
induction' k with bn bih
Β· rw [Nat.add_zero m, hyperoperation]
Β· rw [hyperoperation_recursion, bih, hyperoperation_zero]
exact Nat.add_assoc m bn 1
#align hyperoperation_one hyperoperation_one
@[simp]
theorem hyperoperation_two : hyperoperation 2 = (Β· * Β·) := by
ext m k
induction' k with bn bih
Β· rw [hyperoperation]
exact (Nat.mul_zero m).symm
Β· rw [hyperoperation_recursion, hyperoperation_one, bih]
-- Porting note: was `ring`
dsimp only
nth_rewrite 1 [β mul_one m]
rw [β mul_add, add_comm]
#align hyperoperation_two hyperoperation_two
@[simp]
| Mathlib/Data/Nat/Hyperoperation.lean | 82 | 88 | theorem hyperoperation_three : hyperoperation 3 = (Β· ^ Β·) := by |
ext m k
induction' k with bn bih
Β· rw [hyperoperation_ge_three_eq_one]
exact (pow_zero m).symm
Β· rw [hyperoperation_recursion, hyperoperation_two, bih]
exact (pow_succ' m bn).symm
| 6 | 403.428793 | 2 | 1.444444 | 9 | 1,532 |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Tactic.Ring
#align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
def hyperoperation : β β β β β β β
| 0, _, k => k + 1
| 1, m, 0 => m
| 2, _, 0 => 0
| _ + 3, _, 0 => 1
| n + 1, m, k + 1 => hyperoperation n m (hyperoperation (n + 1) m k)
#align hyperoperation hyperoperation
-- Basic hyperoperation lemmas
@[simp]
theorem hyperoperation_zero (m : β) : hyperoperation 0 m = Nat.succ :=
funext fun k => by rw [hyperoperation, Nat.succ_eq_add_one]
#align hyperoperation_zero hyperoperation_zero
theorem hyperoperation_ge_three_eq_one (n m : β) : hyperoperation (n + 3) m 0 = 1 := by
rw [hyperoperation]
#align hyperoperation_ge_three_eq_one hyperoperation_ge_three_eq_one
theorem hyperoperation_recursion (n m k : β) :
hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k) := by
rw [hyperoperation]
#align hyperoperation_recursion hyperoperation_recursion
-- Interesting hyperoperation lemmas
@[simp]
theorem hyperoperation_one : hyperoperation 1 = (Β· + Β·) := by
ext m k
induction' k with bn bih
Β· rw [Nat.add_zero m, hyperoperation]
Β· rw [hyperoperation_recursion, bih, hyperoperation_zero]
exact Nat.add_assoc m bn 1
#align hyperoperation_one hyperoperation_one
@[simp]
theorem hyperoperation_two : hyperoperation 2 = (Β· * Β·) := by
ext m k
induction' k with bn bih
Β· rw [hyperoperation]
exact (Nat.mul_zero m).symm
Β· rw [hyperoperation_recursion, hyperoperation_one, bih]
-- Porting note: was `ring`
dsimp only
nth_rewrite 1 [β mul_one m]
rw [β mul_add, add_comm]
#align hyperoperation_two hyperoperation_two
@[simp]
theorem hyperoperation_three : hyperoperation 3 = (Β· ^ Β·) := by
ext m k
induction' k with bn bih
Β· rw [hyperoperation_ge_three_eq_one]
exact (pow_zero m).symm
Β· rw [hyperoperation_recursion, hyperoperation_two, bih]
exact (pow_succ' m bn).symm
#align hyperoperation_three hyperoperation_three
| Mathlib/Data/Nat/Hyperoperation.lean | 91 | 95 | theorem hyperoperation_ge_two_eq_self (n m : β) : hyperoperation (n + 2) m 1 = m := by |
induction' n with nn nih
Β· rw [hyperoperation_two]
ring
Β· rw [hyperoperation_recursion, hyperoperation_ge_three_eq_one, nih]
| 4 | 54.59815 | 2 | 1.444444 | 9 | 1,532 |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Tactic.Ring
#align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
def hyperoperation : β β β β β β β
| 0, _, k => k + 1
| 1, m, 0 => m
| 2, _, 0 => 0
| _ + 3, _, 0 => 1
| n + 1, m, k + 1 => hyperoperation n m (hyperoperation (n + 1) m k)
#align hyperoperation hyperoperation
-- Basic hyperoperation lemmas
@[simp]
theorem hyperoperation_zero (m : β) : hyperoperation 0 m = Nat.succ :=
funext fun k => by rw [hyperoperation, Nat.succ_eq_add_one]
#align hyperoperation_zero hyperoperation_zero
theorem hyperoperation_ge_three_eq_one (n m : β) : hyperoperation (n + 3) m 0 = 1 := by
rw [hyperoperation]
#align hyperoperation_ge_three_eq_one hyperoperation_ge_three_eq_one
theorem hyperoperation_recursion (n m k : β) :
hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k) := by
rw [hyperoperation]
#align hyperoperation_recursion hyperoperation_recursion
-- Interesting hyperoperation lemmas
@[simp]
theorem hyperoperation_one : hyperoperation 1 = (Β· + Β·) := by
ext m k
induction' k with bn bih
Β· rw [Nat.add_zero m, hyperoperation]
Β· rw [hyperoperation_recursion, bih, hyperoperation_zero]
exact Nat.add_assoc m bn 1
#align hyperoperation_one hyperoperation_one
@[simp]
theorem hyperoperation_two : hyperoperation 2 = (Β· * Β·) := by
ext m k
induction' k with bn bih
Β· rw [hyperoperation]
exact (Nat.mul_zero m).symm
Β· rw [hyperoperation_recursion, hyperoperation_one, bih]
-- Porting note: was `ring`
dsimp only
nth_rewrite 1 [β mul_one m]
rw [β mul_add, add_comm]
#align hyperoperation_two hyperoperation_two
@[simp]
theorem hyperoperation_three : hyperoperation 3 = (Β· ^ Β·) := by
ext m k
induction' k with bn bih
Β· rw [hyperoperation_ge_three_eq_one]
exact (pow_zero m).symm
Β· rw [hyperoperation_recursion, hyperoperation_two, bih]
exact (pow_succ' m bn).symm
#align hyperoperation_three hyperoperation_three
theorem hyperoperation_ge_two_eq_self (n m : β) : hyperoperation (n + 2) m 1 = m := by
induction' n with nn nih
Β· rw [hyperoperation_two]
ring
Β· rw [hyperoperation_recursion, hyperoperation_ge_three_eq_one, nih]
#align hyperoperation_ge_two_eq_self hyperoperation_ge_two_eq_self
| Mathlib/Data/Nat/Hyperoperation.lean | 98 | 101 | theorem hyperoperation_two_two_eq_four (n : β) : hyperoperation (n + 1) 2 2 = 4 := by |
induction' n with nn nih
Β· rw [hyperoperation_one]
Β· rw [hyperoperation_recursion, hyperoperation_ge_two_eq_self, nih]
| 3 | 20.085537 | 1 | 1.444444 | 9 | 1,532 |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Tactic.Ring
#align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
def hyperoperation : β β β β β β β
| 0, _, k => k + 1
| 1, m, 0 => m
| 2, _, 0 => 0
| _ + 3, _, 0 => 1
| n + 1, m, k + 1 => hyperoperation n m (hyperoperation (n + 1) m k)
#align hyperoperation hyperoperation
-- Basic hyperoperation lemmas
@[simp]
theorem hyperoperation_zero (m : β) : hyperoperation 0 m = Nat.succ :=
funext fun k => by rw [hyperoperation, Nat.succ_eq_add_one]
#align hyperoperation_zero hyperoperation_zero
theorem hyperoperation_ge_three_eq_one (n m : β) : hyperoperation (n + 3) m 0 = 1 := by
rw [hyperoperation]
#align hyperoperation_ge_three_eq_one hyperoperation_ge_three_eq_one
theorem hyperoperation_recursion (n m k : β) :
hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k) := by
rw [hyperoperation]
#align hyperoperation_recursion hyperoperation_recursion
-- Interesting hyperoperation lemmas
@[simp]
theorem hyperoperation_one : hyperoperation 1 = (Β· + Β·) := by
ext m k
induction' k with bn bih
Β· rw [Nat.add_zero m, hyperoperation]
Β· rw [hyperoperation_recursion, bih, hyperoperation_zero]
exact Nat.add_assoc m bn 1
#align hyperoperation_one hyperoperation_one
@[simp]
theorem hyperoperation_two : hyperoperation 2 = (Β· * Β·) := by
ext m k
induction' k with bn bih
Β· rw [hyperoperation]
exact (Nat.mul_zero m).symm
Β· rw [hyperoperation_recursion, hyperoperation_one, bih]
-- Porting note: was `ring`
dsimp only
nth_rewrite 1 [β mul_one m]
rw [β mul_add, add_comm]
#align hyperoperation_two hyperoperation_two
@[simp]
theorem hyperoperation_three : hyperoperation 3 = (Β· ^ Β·) := by
ext m k
induction' k with bn bih
Β· rw [hyperoperation_ge_three_eq_one]
exact (pow_zero m).symm
Β· rw [hyperoperation_recursion, hyperoperation_two, bih]
exact (pow_succ' m bn).symm
#align hyperoperation_three hyperoperation_three
theorem hyperoperation_ge_two_eq_self (n m : β) : hyperoperation (n + 2) m 1 = m := by
induction' n with nn nih
Β· rw [hyperoperation_two]
ring
Β· rw [hyperoperation_recursion, hyperoperation_ge_three_eq_one, nih]
#align hyperoperation_ge_two_eq_self hyperoperation_ge_two_eq_self
theorem hyperoperation_two_two_eq_four (n : β) : hyperoperation (n + 1) 2 2 = 4 := by
induction' n with nn nih
Β· rw [hyperoperation_one]
Β· rw [hyperoperation_recursion, hyperoperation_ge_two_eq_self, nih]
#align hyperoperation_two_two_eq_four hyperoperation_two_two_eq_four
| Mathlib/Data/Nat/Hyperoperation.lean | 104 | 113 | theorem hyperoperation_ge_three_one (n : β) : β k : β, hyperoperation (n + 3) 1 k = 1 := by |
induction' n with nn nih
Β· intro k
rw [hyperoperation_three]
dsimp
rw [one_pow]
Β· intro k
cases k
Β· rw [hyperoperation_ge_three_eq_one]
Β· rw [hyperoperation_recursion, nih]
| 9 | 8,103.083928 | 2 | 1.444444 | 9 | 1,532 |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Tactic.Ring
#align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
def hyperoperation : β β β β β β β
| 0, _, k => k + 1
| 1, m, 0 => m
| 2, _, 0 => 0
| _ + 3, _, 0 => 1
| n + 1, m, k + 1 => hyperoperation n m (hyperoperation (n + 1) m k)
#align hyperoperation hyperoperation
-- Basic hyperoperation lemmas
@[simp]
theorem hyperoperation_zero (m : β) : hyperoperation 0 m = Nat.succ :=
funext fun k => by rw [hyperoperation, Nat.succ_eq_add_one]
#align hyperoperation_zero hyperoperation_zero
theorem hyperoperation_ge_three_eq_one (n m : β) : hyperoperation (n + 3) m 0 = 1 := by
rw [hyperoperation]
#align hyperoperation_ge_three_eq_one hyperoperation_ge_three_eq_one
theorem hyperoperation_recursion (n m k : β) :
hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k) := by
rw [hyperoperation]
#align hyperoperation_recursion hyperoperation_recursion
-- Interesting hyperoperation lemmas
@[simp]
theorem hyperoperation_one : hyperoperation 1 = (Β· + Β·) := by
ext m k
induction' k with bn bih
Β· rw [Nat.add_zero m, hyperoperation]
Β· rw [hyperoperation_recursion, bih, hyperoperation_zero]
exact Nat.add_assoc m bn 1
#align hyperoperation_one hyperoperation_one
@[simp]
theorem hyperoperation_two : hyperoperation 2 = (Β· * Β·) := by
ext m k
induction' k with bn bih
Β· rw [hyperoperation]
exact (Nat.mul_zero m).symm
Β· rw [hyperoperation_recursion, hyperoperation_one, bih]
-- Porting note: was `ring`
dsimp only
nth_rewrite 1 [β mul_one m]
rw [β mul_add, add_comm]
#align hyperoperation_two hyperoperation_two
@[simp]
theorem hyperoperation_three : hyperoperation 3 = (Β· ^ Β·) := by
ext m k
induction' k with bn bih
Β· rw [hyperoperation_ge_three_eq_one]
exact (pow_zero m).symm
Β· rw [hyperoperation_recursion, hyperoperation_two, bih]
exact (pow_succ' m bn).symm
#align hyperoperation_three hyperoperation_three
theorem hyperoperation_ge_two_eq_self (n m : β) : hyperoperation (n + 2) m 1 = m := by
induction' n with nn nih
Β· rw [hyperoperation_two]
ring
Β· rw [hyperoperation_recursion, hyperoperation_ge_three_eq_one, nih]
#align hyperoperation_ge_two_eq_self hyperoperation_ge_two_eq_self
theorem hyperoperation_two_two_eq_four (n : β) : hyperoperation (n + 1) 2 2 = 4 := by
induction' n with nn nih
Β· rw [hyperoperation_one]
Β· rw [hyperoperation_recursion, hyperoperation_ge_two_eq_self, nih]
#align hyperoperation_two_two_eq_four hyperoperation_two_two_eq_four
theorem hyperoperation_ge_three_one (n : β) : β k : β, hyperoperation (n + 3) 1 k = 1 := by
induction' n with nn nih
Β· intro k
rw [hyperoperation_three]
dsimp
rw [one_pow]
Β· intro k
cases k
Β· rw [hyperoperation_ge_three_eq_one]
Β· rw [hyperoperation_recursion, nih]
#align hyperoperation_ge_three_one hyperoperation_ge_three_one
| Mathlib/Data/Nat/Hyperoperation.lean | 116 | 126 | theorem hyperoperation_ge_four_zero (n k : β) :
hyperoperation (n + 4) 0 k = if Even k then 1 else 0 := by |
induction' k with kk kih
Β· rw [hyperoperation_ge_three_eq_one]
simp only [Nat.zero_eq, even_zero, if_true]
Β· rw [hyperoperation_recursion]
rw [kih]
simp_rw [Nat.even_add_one]
split_ifs
Β· exact hyperoperation_ge_two_eq_self (n + 1) 0
Β· exact hyperoperation_ge_three_eq_one n 0
| 9 | 8,103.083928 | 2 | 1.444444 | 9 | 1,532 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.