File size: 3,044 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import OAI.AlgebraicGeometry.DivisorClass.Chern.Rational.HolomorphicPeriod
import Mathlib.Data.Rat.Floor

/-! # Integral Scaling -/

namespace OAI.AlgebraicGeometry.DivisorClass.Chern.Compact.IntegralScaling

noncomputable section

/-! Constructive common denominators for locally constant rational sections on compact sets. -/

open _root_.TopologicalSpace

set_option backward.isDefEq.respectTransparency false
set_option backward.isDefEq.respectTransparency.types false
set_option backward.defeqAttrib.useBackward true

def rationalCommonDenominator (s : Finset β„š) : β„• := ∏ q ∈ s, q.den

theorem rationalCommonDenominator_pos (s : Finset β„š) : 0 < rationalCommonDenominator s := by
  exact Finset.prod_pos (fun q _ => q.den_pos)

theorem rationalCommonDenominator_dvd (s : Finset β„š) (q : β„š) (hq : q ∈ s) :
    q.den ∣ rationalCommonDenominator s :=
  Finset.dvd_prod_of_mem (fun q : β„š => q.den) hq

theorem rational_scaled_integer_of_den_dvd (q : β„š) (N : β„•) (h : q.den ∣ N) :
    ((((N / q.den : β„•) : β„€) * q.num : β„€) : β„š) = (N : β„š) * q := by
  have hd : (q.den : β„š) β‰  0 := by exact_mod_cast q.den_ne_zero
  have hn : ((N / q.den : β„•) : β„š) * q.den = (N : β„š) := by
    exact_mod_cast Nat.div_mul_cancel h
  calc
    ((((N / q.den : β„•) : β„€) * q.num : β„€) : β„š) =
        ((N / q.den : β„•) : β„š) * (q.num : β„š) := by push_cast; rfl
    _ = ((N / q.den : β„•) : β„š) * (q.den * q) := by
      congr 1
      simpa only [mul_comm] using (div_eq_iff hd).mp q.num_div_den
    _ = (N : β„š) * q := by rw [← mul_assoc, hn]

/-- A locally constant rational section on a compact space has an explicitly constructed common denominator. -/
theorem locallyConstant_rat_clear_denominators {T : Type} [TopologicalSpace T] [CompactSpace T]
    (f : LocallyConstant T β„š) :
    βˆƒ N : β„•, 0 < N ∧ βˆƒ g : LocallyConstant T β„€, βˆ€ x, (g x : β„š) = (N : β„š) * f x := by
  classical
  let s := f.range_finite.toFinset
  let N := rationalCommonDenominator s
  refine ⟨N, rationalCommonDenominator_pos s,
    LocallyConstant.map (fun q : β„š => ((N / q.den : β„•) : β„€) * q.num) f, ?_⟩
  intro x
  exact rational_scaled_integer_of_den_dvd (f x) N
    (rationalCommonDenominator_dvd s (f x) ((f.range_finite.mem_toFinset).mpr ⟨x, rfl⟩))

/-- The denominator is uniform on a compact subset of an arbitrary open domain. -/
theorem locallyConstant_rat_clear_denominators_on_compact {T : Type} [TopologicalSpace T]
    (U : Opens T) (f : LocallyConstant U β„š) (K : Set T) (hK : IsCompact K) (hKU : K βŠ† U) :
    βˆƒ N : β„•, 0 < N ∧ βˆƒ g : LocallyConstant K β„€,
      βˆ€ x : K, (g x : β„š) = (N : β„š) * f ⟨x.val, hKU x.property⟩ := by
  have : CompactSpace K := isCompact_iff_compactSpace.mp hK
  let fK : LocallyConstant K β„š :=
    ⟨fun x => f ⟨x.val, hKU x.property⟩,
      f.isLocallyConstant.comp_continuous (continuous_subtype_val.subtype_mk _)⟩
  exact locallyConstant_rat_clear_denominators fK

end

end OAI.AlgebraicGeometry.DivisorClass.Chern.Compact.IntegralScaling