Parameters along embeddings
Lax434175.Parameters · concepts/Lax434175/Parameters.lean · lax-434175
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
A parameter of a problem assigns a natural number to every instance. An embedding of into bounds a parameter of by a function of a parameter of if for every instance of , where is the instance map.
For problems assembled from fields there are two sources of parameters. A kernel parameter depends on the kernel instance only, such as the number of machines. A field parameter depends on the data of one constraint module, such as the number of distinct release dates; it is invariant if reading data with a more general value does not change it.
Theorem. The embedding induced by a field-wise comparison of specifications preserves every kernel parameter and every invariant field parameter exactly.
For reductions of decision versions, let and assign to the instances of and values of any kind, for instance pairs of numbers, and let relate such values. Problem reduces to with if some reduction maps every instance to an instance with . A reduction between two problems of one family is in place if it does not change the kernel instance, and hence no kernel parameter, and changes no invariant field parameter.
Theorem. A sound embedding that relates the parameters gives a reduction with the same relation, and reductions with relations compose.
Reductions are arbitrary maps here: their running time is not modelled.
Concept map
Evidence
This concept declares 5 statements. Each proof establishes one of them relative to its assumptions.
1 lift_ofField proven
2 lift_ofKernel proven
3 reducible_of_reducibleWith proven
4 reducibleWith_of_embedding proven
5 reducibleWith_trans proven
Lean source view on GitHub
| 1 | import Lax434175.Assembly |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Parameters along embeddings |
| 6 | type: theorem |
| 7 | --- |
| 8 | A parameter of a problem assigns a natural number to every instance. An |
| 9 | embedding of into bounds a parameter of by a function |
| 10 | of a parameter of if |
| 11 | for every instance of , where is the instance map. |
| 12 | |
| 13 | For problems assembled from fields there are two sources of parameters. A |
| 14 | kernel parameter depends on the kernel instance only, such as the number of |
| 15 | machines. A field parameter depends on the data of one constraint module, |
| 16 | such as the number of distinct release dates; it is invariant if reading data |
| 17 | with a more general value does not change it. |
| 18 | |
| 19 | **Theorem.** The embedding induced by a field-wise comparison of |
| 20 | specifications preserves every kernel parameter and every invariant field |
| 21 | parameter exactly. |
| 22 | |
| 23 | For reductions of decision versions, let and assign to |
| 24 | the instances of and values of any kind, for instance pairs of |
| 25 | numbers, and let relate such values. Problem reduces to with |
| 26 | if some reduction maps every instance to an instance with |
| 27 | . A reduction between two problems of one |
| 28 | family is in place if it does not change the kernel instance, and hence no |
| 29 | kernel parameter, and changes no invariant field parameter. |
| 30 | |
| 31 | **Theorem.** A sound embedding that relates the parameters gives a reduction |
| 32 | with the same relation, and reductions with relations compose. |
| 33 | |
| 34 | Reductions are arbitrary maps here: their running time is not modelled. |
| 35 | -/ |
| 36 | |
| 37 | namespace Lax434175.Parameters |
| 38 | open Lax434175.Problems Lax434175.Kernels Lax434175.Modules Lax434175.Assembly |
| 39 | |
| 40 | /-- A parameter of a problem. -/ |
| 41 | abbrev Parameter (P : Problem) := P.Inst → ℕ |
| 42 | |
| 43 | /-- The embedding bounds `κB` by `g` of `κA`. -/ |
| 44 | def Bounds {A B : Problem} (e : Embedding A B) (κA : Parameter A) (κB : Parameter B) |
| 45 | (g : ℕ → ℕ) : Prop := |
| 46 | ∀ x, κB (e.map x) ≤ g (κA x) |
| 47 | |
| 48 | /-- A parameter that depends on the kernel instance only. -/ |
| 49 | def ofKernel {K : Kernel} (F : Family K) (κ : K.Inst → ℕ) (s : Spec F) : |
| 50 | Parameter (problem F s) := |
| 51 | fun x => κ x.base |
| 52 | |
| 53 | /-- A parameter that depends on the data of one constraint module. -/ |
| 54 | abbrev FieldParameter {K : Kernel} (M : Module K) := |
| 55 | (v : M.Value) → (x : K.Inst) → M.Data v x → ℕ |
| 56 | |
| 57 | /-- Reading data with a more general value does not change the parameter. -/ |
| 58 | def FieldParameter.Invariant {K : Kernel} {M : Module K} (κ : FieldParameter M) : Prop := |
| 59 | ∀ (v w : M.Value) (h : M.le v w = true) (x : K.Inst) (d : M.Data v x), |
| 60 | κ w x (M.embed h x d) = κ v x d |
| 61 | |
| 62 | /-- A field parameter as a parameter of an assembled problem. -/ |
| 63 | def ofField {K : Kernel} (F : Family K) (i : F.ModuleName) (κ : FieldParameter (F.module i)) |
| 64 | (s : Spec F) : Parameter (problem F s) := |
| 65 | fun x => κ (s.module i) x.base (x.data i) |
| 66 | |
| 67 | /-- `A` reduces to `B` by a reduction that relates the parameter values of |
| 68 | an instance and of its image by `R`. -/ |
| 69 | def ReducibleWith {A B : Problem} {α β : Type} (κA : A.Inst → α) (κB : B.Inst → β) |
| 70 | (R : α → β → Prop) : Prop := |
| 71 | ∃ r : DecisionReduction A B, r.Sound ∧ ∀ x D, R (κA x) (κB (r.map x D)) |
| 72 | |
| 73 | /-- A reduction between two problems of a family that keeps the kernel |
| 74 | instance and every invariant field parameter. -/ |
| 75 | structure InPlace {K : Kernel} {F : Family K} {s t : Spec F} |
| 76 | (r : DecisionReduction (problem F s) (problem F t)) : Prop where |
| 77 | base : ∀ (x : Inst F s) (D : ℤ), (r.map x D).base = x.base |
| 78 | field : ∀ (i : F.ModuleName) (κ : FieldParameter (F.module i)), κ.Invariant → |
| 79 | ∀ (x : Inst F s) (D : ℤ), ofField F i κ t (r.map x D) = ofField F i κ s x |
| 80 | |
| 81 | /-- The decision version of the problem of `s` reduces in place to that of |
| 82 | `t`. -/ |
| 83 | def ReducibleInPlace {K : Kernel} {F : Family K} (s t : Spec F) : Prop := |
| 84 | ∃ r : DecisionReduction (problem F s) (problem F t), r.Sound ∧ InPlace r |
| 85 | |
| 86 | axiom reducibleWith_of_embedding {A B : Problem} {α β : Type} (e : Embedding A B) |
| 87 | (κA : A.Inst → α) (κB : B.Inst → β) (R : α → β → Prop) : |
| 88 | e.Sound → (∀ x, R (κA x) (κB (e.map x))) → ReducibleWith κA κB R |
| 89 | |
| 90 | axiom reducibleWith_trans {A B C : Problem} {α β γ : Type} (κA : A.Inst → α) |
| 91 | (κB : B.Inst → β) (κC : C.Inst → γ) (R : α → β → Prop) (S : β → γ → Prop) : |
| 92 | ReducibleWith κA κB R → ReducibleWith κB κC S → |
| 93 | ReducibleWith κA κC (fun a c => ∃ b, R a b ∧ S b c) |
| 94 | |
| 95 | axiom reducible_of_reducibleWith {A B : Problem} {α β : Type} (κA : A.Inst → α) |
| 96 | (κB : B.Inst → β) (R : α → β → Prop) : ReducibleWith κA κB R → Reducible A B |
| 97 | |
| 98 | axiom lift_ofKernel {K : Kernel} (F : Family K) (hF : F.Sound) (κ : K.Inst → ℕ) |
| 99 | {s t : Spec F} (h : s.le t) : |
| 100 | ∀ x, ofKernel F κ t ((lift F hF h).map x) = ofKernel F κ s x |
| 101 | |
| 102 | axiom lift_ofField {K : Kernel} (F : Family K) (hF : F.Sound) (i : F.ModuleName) |
| 103 | (κ : FieldParameter (F.module i)) (hκ : κ.Invariant) {s t : Spec F} (h : s.le t) : |
| 104 | ∀ x, ofField F i κ t ((lift F hF h).map x) = ofField F i κ s x |
| 105 | |
| 106 | end Lax434175.Parameters |
| 107 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments