File size: 1,508 Bytes
92416a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import OAI.Computability.WitnessedChoice.ChoiceSeparation

namespace OAI


namespace WitnessedChoice

noncomputable section

open Classical WitnessedSeparation WitnessedSeparation.Grid BGS

theorem main : BGS.MainStatement := by
  let φ := SourceProgram.program.sentence SourceProgram.polynomial
  refine ⟨φ,SourceProgram.one_occurrence,
    SourceProgram.boolean_all SourceProgram.polynomial SourceProgram.resource_basic,?_⟩
  intro ψ hψ heq
  obtain ⟨n,hn,hh⟩ := ψ.agrees_on_some_grid_pair hψ
  let vstar : Vertex n := (0,0,0)
  have hzero : φ.eval (gridInput (0 : Vertex n → WitnessedSeparation.Scalar)) = some true := by
    change SourceProgram.program.formula.eval (atomInput (0 : Vertex n → WitnessedSeparation.Scalar))
      SourceProgram.polynomial Fin.elim0 = _
    rw [QuotedGrid.formula_value _ (gridResources hn) hn]
    simp
  have hone : φ.eval (gridInput (Pi.single vstar 1)) = some false := by
    change SourceProgram.program.formula.eval (atomInput (Pi.single vstar 1))
      SourceProgram.polynomial Fin.elim0 = _
    rw [QuotedGrid.formula_value _ (gridResources hn) hn]
    simp
  have hmem : gridInput (0 : Vertex n → WitnessedSeparation.Scalar) ∈ ψ.TrueModels := by
    rw [←heq]
    exact hzero
  have hmem' : gridInput (Pi.single vstar 1) ∈ φ.TrueModels := by
    rw [heq]
    exact (hh vstar).symm.trans hmem
  change φ.eval (gridInput (Pi.single vstar 1)) = some true at hmem'
  rw [hone] at hmem'
  contradiction

end

end WitnessedChoice

end OAI