File size: 1,857 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
import OAI.Probability.SATComputability.MaskPermutations
import OAI.Probability.SATComputability.GridBlockLaw

namespace OAI

namespace FixedClauseThreshold.Computability

open DilutedSpinGlass _root_.MeasureTheory _root_.OAI.MeasureTheory
open scoped NNReal Classical

theorem maskGrid_permutation {n k M : β„•} (e : Equiv.Perm (Fin n))
    (c : (Fin k β†’ SignedLiteral n) Γ— Fin M β†’ β„•) :
    (fun j => renameMask e (maskGrid clauseMask c j)) =
      maskGrid clauseMask (fun p => c ((clausePermutation e k).symm p.1,p.2)) := by
  funext j
  exact countsMask_permutation e (fun a => c (a,j))

theorem gridMaskLaw_permutation {n k M : β„•} (e : Equiv.Perm (Fin n)) (r : ℝβ‰₯0)
    (f : (Fin M β†’ Finset (DeletionCandidate n)) β†’ ℝ) :
    (gridMaskLaw M r (clauseMask (n := n) (k := k))).expect
      (fun xs => f (fun j => renameMask e (xs j))) =
      (gridMaskLaw M r (clauseMask (n := n) (k := k))).expect f := by
  simp only [gridMaskLaw_expect, maskGrid_permutation]
  have h := poissonCountLaw_equiv
    ((clausePermutation e k).prodCongr (Equiv.refl (Fin M))) r
    (fun c => f (maskGrid clauseMask c))
  exact h

theorem candidatePath_permutation {n : β„•} [NeZero n] (M k : β„•)
    (e : Equiv.Perm (Fin n)) (r : ℝβ‰₯0)
    (f : (Fin M β†’ Finset (DeletionCandidate n)) β†’ ℝ) :
    (FiniteLaw.pi (fun _ : Fin M => candidateBlock r k Finset.univ)).expect
      (fun xs => f (fun j => renameMask e (xs j))) =
      (FiniteLaw.pi (fun _ : Fin M => candidateBlock r k Finset.univ)).expect f := by
  have hc : (Fintype.card (Fin k β†’ SignedLiteral n) : ℝβ‰₯0) β‰  0 := by
    exact_mod_cast Fintype.card_ne_zero
  have h := gridMaskLaw_permutation (k := k) (M := M) e
    (r/Fintype.card (Fin k β†’ SignedLiteral n)) f
  rw [gridMaskLaw_clauses, div_mul_cancelβ‚€ _ hc] at h
  exact h

end FixedClauseThreshold.Computability

end OAI