Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various results useful for weak approximation #322

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions FLT/Mathlib/Analysis/Normed/Ring/WithAbs.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Mathlib.Analysis.Normed.Ring.WithAbs
import Mathlib.NumberTheory.NumberField.Basic

namespace WithAbs

variable {K : Type*} [Field K] {v : AbsoluteValue K ℝ}
{L : Type*} [Field L] [Algebra K L] {w : AbsoluteValue L ℝ}

instance : Algebra (WithAbs v) (WithAbs w) := ‹Algebra K L›

instance : Algebra K (WithAbs w) := ‹Algebra K L›

instance [NumberField K] : NumberField (WithAbs v) := ‹NumberField K›

theorem norm_eq_abs (x : WithAbs v) : ‖x‖ = v x := rfl

end WithAbs
13 changes: 13 additions & 0 deletions FLT/Mathlib/Data/Fin/Basic.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Mathlib.Data.Fin.Basic
import Mathlib.Data.Fin.VecNotation
import Mathlib.Logic.Pairwise

theorem Fin.castPred_ne_zero {n : ℕ} {j : Fin (n + 2)} (h₁ : j ≠ Fin.last (n + 1)) (h₂ : j ≠ 0) :
Fin.castPred j h₁ ≠ 0 := by
contrapose! h₂
rwa [← Fin.castPred_zero, Fin.castPred_inj] at h₂

theorem Fin.pairwise_forall_two {n : ℕ} {r : Fin (n + 2) → Fin (n + 2) → Prop} (h : Pairwise r) :
Pairwise (r.onFun ![0, Fin.last _]) := by
apply Pairwise.comp_of_injective h
simp [Function.Injective, Fin.forall_fin_two]
17 changes: 17 additions & 0 deletions FLT/Mathlib/Data/Finset/Lattice/Fold.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Mathlib.Data.Finset.Lattice.Fold

theorem Finset.le_sup_dite_pos {α β : Type*} [SemilatticeSup α] [OrderBot α] {s : Finset β}
(p : β → Prop) [DecidablePred p] {f : (b : β) → p b → α} {g : (b : β) → ¬p b → α} {b : β}
(h₀ : b ∈ s) (h₁ : p b) :
f b h₁ ≤ s.sup fun i => if h : p i then f i h else g i h := by
have : f b h₁ = (fun i => if h : p i then f i h else g i h) b := by simp [h₁]
rw [this]
apply Finset.le_sup h₀

theorem Finset.le_sup_dite_neg {α β : Type*} [SemilatticeSup α] [OrderBot α] {s : Finset β}
(p : β → Prop) [DecidablePred p] {f : (b : β) → p b → α} {g : (b : β) → ¬p b → α} {b : β}
(h₀ : b ∈ s) (h₁ : ¬p b) :
g b h₁ ≤ s.sup fun i => if h : p i then f i h else g i h := by
have : g b h₁ = (fun i => if h : p i then f i h else g i h) b := by simp [h₁]
rw [this]
apply Finset.le_sup h₀
7 changes: 7 additions & 0 deletions FLT/Mathlib/Topology/Constructions.lean
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import Mathlib.Topology.Constructions
import Mathlib.Topology.ContinuousOn

theorem TopologicalSpace.prod_mono {α β : Type*} {σ₁ σ₂ : TopologicalSpace α}
{τ₁ τ₂ : TopologicalSpace β} (hσ : σ₁ ≤ σ₂) (hτ : τ₁ ≤ τ₂) :
@instTopologicalSpaceProd α β σ₁ τ₁ ≤ @instTopologicalSpaceProd α β σ₂ τ₂ :=
le_inf (inf_le_left.trans <| induced_mono hσ)
(inf_le_right.trans <| induced_mono hτ)

theorem DenseRange.piMap {ι : Type*} {X Y : ι → Type*} [∀ i, TopologicalSpace (Y i)]
{f : (i : ι) → (X i) → (Y i)} (hf : ∀ i, DenseRange (f i)):
DenseRange (Pi.map f) := by
rw [DenseRange, Set.range_piMap]
exact dense_pi Set.univ (fun i _ => hf i)
Loading