File size: 1,312 Bytes
dd14c26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import Mathlib
import OAI.Probability.LogConcave.OraclePrograms.Expression

namespace OAI

section
section
noncomputable section
namespace LogConcaveSampling.SeedCompiler
open OracleCompiler OracleCompiler.Expression

lemma terminalMean_equivariant {d : ℕ} (r σ : ℝ) (Δ : Point d) :
    (terminalMean d r σ).Equivariant
      (moveSeed (fun x => x+r • Δ) (terminalShift 1) Δ) id := by
  apply Program.oneQuery_equivariant
  · intro z
    exact terminalQuery_invariant _ _ _ _
  · intro z a
    simp [moveSeed,shiftSlots,terminalShift]

lemma terminalSample_equivariant {d : ℕ} (r η : ℝ) (Δ : Point d) :
    (terminalSample d r η).Equivariant
      (moveSeed (fun x => x+r • Δ) (terminalShift 2) Δ) (fun y => y-Δ) := by
  apply Program.oneQuery_equivariant
  · intro z
    exact terminalQuery_invariant _ _ _ _
  · intro z a
    simp [moveSeed,shiftSlots,terminalShift]
    module

lemma terminalSample_reserved {d : ℕ} (r η : ℝ) (Δ : Point d) :
    (terminalSample d r η).Equivariant
      (moveSeed id (fun i => if i=2 then 1 else 0) Δ) (fun y => y+(η/2) • Δ) := by
  apply Program.oneQuery_equivariant
  · intro z
    simp [moveSeed,shiftSlots]
  · intro z a
    simp [moveSeed,shiftSlots,smul_add]
    abel

end LogConcaveSampling.SeedCompiler

end

end

end

end OAI