DERIVED: Definition named 'DENY_PUF' in the CubieOutputStateV2_5 family -- registry statement: V2.5 Output State

Definition DENY_PUF : N            := 0x17171717%N.


DERIVED: Definition named 'DENY_THERMAL' in the CubieOutputStateV2_5 family -- registry statement: V2.5 Output State

Definition DENY_THERMAL : N        := 0x28282828%N.

not stated in registry status for this row

(empty -- not bound to any bare-metal exec fn/crate)


DERIVED: Definition named 'DENY_CONSENT' in the CubieOutputStateV2_5 family -- registry statement: V2.5 Output State

Definition DENY_CONSENT : N        := 0x39393939%N.


DERIVED: Definition named 'DENY_HEAD_SHAPE' in the CubieOutputStateV2_5 family -- registry statement: V2.5 Output State

Definition DENY_HEAD_SHAPE : N     := 0x4A4A4A4A%N.


DERIVED: Definition named 'DENY_NVLINK' in the CubieOutputStateV2_5 family -- registry statement: V2.5 Output State

Definition DENY_NVLINK : N         := 0x5B5B5B5B%N.


DERIVED: Definition named 'DENY_PCIE' in the CubieOutputStateV2_5 family -- registry statement: V2.5 Output State

Definition DENY_PCIE : N           := 0x6C6C6C6C%N.


DERIVED: Definition named 'DENY_NULL' in the CubieOutputStateV2_5 family -- registry statement: V2.5 Output State

Definition DENY_NULL : N           := 0x7D7D7D7D%N.


DERIVED: Definition named 'DENY_EPHEMERAL' in the CubieOutputStateV2_5 family -- registry statement: V2.5 Output State

Definition DENY_EPHEMERAL : N      := 0x8E8E8E8E%N.


DERIVED: Definition named 'hamming_N' in the CubieOutputStateV2_5 family -- registry statement: V2.5 Output State

Definition hamming_N (a b : N) : nat := popcount_N (N.lxor a b).


DERIVED: Lemma named 'allow_xor_deny_kv' in the CubieOutputStateV2_5 family -- registry statement: V2.5 Output State

Lemma allow_xor_deny_kv : N.lxor ALLOW_CODE DENY_KV_HEAD_BUDGET = 0xFBFBFBFB%N.


DERIVED: Theorem named 'CUB_0844_allow_vs_deny_kv_hamming' in the CubieOutputStateV2_5 family -- registry statement: V2.5 Output State

Theorem CUB_0844_allow_vs_deny_kv_hamming :
  hamming_N ALLOW_CODE DENY_KV_HEAD_BUDGET >= 16.


DERIVED: Theorem named 'CUB_0846_deny_completeness' in the CubieOutputStateV2_5 family -- registry statement: V2.5 Output State

Theorem CUB_0846_deny_completeness :
  forall (level reason : N), maps_to level reason <> ALLOW_CODE.


DERIVED: Definition named 'denial_pipeline_level' in the CubieOutputStateV2_5 family -- registry statement: V2.5 Output State

Definition denial_pipeline_level (code : N) : N :=
  N.land (N.shiftr code 16) 0xFF%N.


DERIVED: Theorem named 'CUB_0847_level_extractable' in the CubieOutputStateV2_5 family -- registry statement: V2.5 Output State

Theorem CUB_0847_level_extractable :
  forall (code : N),
    denial_pipeline_level code = N.land (N.shiftr code 16) 0xFF%N.


DERIVED: Definition named 'TCM_BASE' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition TCM_BASE   : nat := 128 * KIB * KIB.


DERIVED: Definition named 'TCM_SIZE' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition TCM_SIZE   : nat := 64 * KIB.


DERIVED: Definition named 'EFUSE_BASE' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition EFUSE_BASE : nat := 256 * KIB * KIB.


DERIVED: Definition named 'EFUSE_SIZE' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP


DERIVED: Definition named 'MMIO_BASE' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition MMIO_BASE  : nat := 255 * (16 ^ 6).


DERIVED: Definition named 'MMIO_SIZE' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition MMIO_SIZE  : nat := KIB * KIB.


DERIVED: Definition named 'PMP_L' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition PMP_L      : nat := 0x80.  (* lock bit *)
Definition PMP_A_NAPOT: nat := 0x03.  (* naturally aligned power-of-two *)
Definition PMP_R      : nat := 0x01.


DERIVED: Definition named 'PMP_A_NAPOT' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition PMP_A_NAPOT: nat := 0x03.  (* naturally aligned power-of-two *)
Definition PMP_R      : nat := 0x01.


DERIVED: Definition named 'PMP_R' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP


DERIVED: Definition named 'PMP_W' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP


DERIVED: Definition named 'PMP_X' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP


DERIVED: Definition named 'region_covers' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition region_covers (region : NapotRegion) (addr : nat) : Prop :=
  base region <= addr /\ addr < base region + size region.

def region_covers (r : NapotRegion) (addr : Nat) : Prop


DERIVED: Definition named 'is_locked' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition is_locked (entry : PmpEntry) : bool :=
  Nat.leb PMP_L (Nat.land (cfg_byte entry) PMP_L).


DERIVED: Definition named 'napot_addr' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition napot_addr (b s : nat) : nat :=
  Nat.shiftr (Nat.lor b (s / 2 - 1)) 2.


DERIVED: Definition named 'pmpcfg_byte' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition pmpcfg_byte (lock : bool) (a_mode rwx : nat) : nat :=
  let base := Nat.land rwx 0x07 in
  let with_a := Nat.lor base (Nat.land a_mode 0x03 * 8) in
  if lock then Nat.lor with_a PMP_L else with_a.

def pmpcfg_byte (lock : Bool) (a_mode rwx : Nat) : Nat


DERIVED: Definition named 'tcm_entry' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition tcm_entry : PmpEntry := mkEntry
  (napot_addr TCM_BASE TCM_SIZE)
  (pmpcfg_byte true PMP_A_NAPOT (Nat.lor (Nat.lor PMP_R PMP_W) PMP_X))
  (mkRegion TCM_BASE TCM_SIZE).


DERIVED: Definition named 'efuse_entry' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition efuse_entry : PmpEntry := mkEntry
  (napot_addr EFUSE_BASE EFUSE_SIZE)
  (pmpcfg_byte true PMP_A_NAPOT PMP_R)
  (mkRegion EFUSE_BASE EFUSE_SIZE).


DERIVED: Definition named 'mmio_entry' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition mmio_entry : PmpEntry := mkEntry
  (napot_addr MMIO_BASE MMIO_SIZE)
  (pmpcfg_byte true PMP_A_NAPOT (Nat.lor PMP_R PMP_W))
  (mkRegion MMIO_BASE MMIO_SIZE).


DERIVED: Theorem named 'cub_0895_pmp_tcm_entry_covers_tcm' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Theorem cub_0895_pmp_tcm_entry_covers_tcm :
  forall (addr : nat),
    TCM_BASE <= addr ->
    addr < TCM_BASE + TCM_SIZE ->
    region_covers (region tcm_entry) addr.

theorem cub_0895_pmp_tcm_entry_covers_tcm (addr : Nat)
    (h1 : TCM_BASE ≤ addr) (h2 : addr < TCM_BASE + TCM_SIZE) :
    region_covers tcm_entry.region addr


DERIVED: Theorem named 'cub_0896_pmp_efuse_entry_covers_efuse' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Theorem cub_0896_pmp_efuse_entry_covers_efuse :
  forall (addr : nat),
    EFUSE_BASE <= addr ->
    addr < EFUSE_BASE + EFUSE_SIZE ->
    region_covers (region efuse_entry) addr.

theorem cub_0896_pmp_efuse_entry_covers_efuse (addr : Nat)
    (h1 : EFUSE_BASE ≤ addr) (h2 : addr < EFUSE_BASE + EFUSE_SIZE) :
    region_covers efuse_entry.region addr


DERIVED: Theorem named 'cub_0897_pmp_mmio_entry_covers_mmio' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Theorem cub_0897_pmp_mmio_entry_covers_mmio :
  forall (addr : nat),
    MMIO_BASE <= addr ->
    addr < MMIO_BASE + MMIO_SIZE ->
    region_covers (region mmio_entry) addr.

theorem cub_0897_pmp_mmio_entry_covers_mmio (addr : Nat)
    (h1 : MMIO_BASE ≤ addr) (h2 : addr < MMIO_BASE + MMIO_SIZE) :
    region_covers mmio_entry.region addr


DERIVED: Definition named 'write_attempt' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Definition write_attempt (entry : PmpEntry) (new_cfg : nat) : nat :=
  if is_locked entry then cfg_byte entry else new_cfg.

def write_attempt (entry : PmpEntry) (new_cfg : Nat) : Nat


DERIVED: Theorem named 'cub_0898_pmp_lock_prevents_modification' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Theorem cub_0898_pmp_lock_prevents_modification :
  forall (entry : PmpEntry) (new_cfg : nat),
    is_locked entry = true ->
    write_attempt entry new_cfg = cfg_byte entry.

theorem cub_0898_pmp_lock_prevents_modification (entry : PmpEntry) (new_cfg : Nat)
    (h : is_locked entry = true) :
    write_attempt entry new_cfg = entry.cfg_byte


DERIVED: Theorem named 'canonical_tcm_entry_is_locked' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Theorem canonical_tcm_entry_is_locked :
  is_locked tcm_entry = true.


DERIVED: Theorem named 'canonical_efuse_entry_is_locked' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Theorem canonical_efuse_entry_is_locked :
  is_locked efuse_entry = true.


DERIVED: Theorem named 'canonical_mmio_entry_is_locked' in the CubiePmpV2_5 family -- registry statement: V2.5 PMP/IOPMP

Theorem canonical_mmio_entry_is_locked :
  is_locked mmio_entry = true.


DERIVED: Definition named 'LATTICE_DIM' in the CubiePostQuantum family -- registry statement: Post-Quantum


DERIVED: Definition named 'SECURITY_BITS' in the CubiePostQuantum family -- registry statement: Post-Quantum


DERIVED: Definition named 'mlwe_hard' in the CubiePostQuantum family -- registry statement: Post-Quantum

Definition mlwe_hard (dim security : nat) : bool :=
  Nat.leb 54 dim && Nat.leb 256 security.


DERIVED: Definition named 'cubie_lattice_isomorphism' in the CubiePostQuantum family -- registry statement: Post-Quantum

Definition cubie_lattice_isomorphism (geom_dim lattice_dim : nat) : bool :=
  Nat.eqb geom_dim lattice_dim && Nat.eqb geom_dim LATTICE_DIM.


DERIVED: Definition named 'inside_trust_polytope' in the CubiePostQuantum family -- registry statement: Post-Quantum

Definition inside_trust_polytope (faces_pass total_faces : nat) : bool :=
  Nat.eqb faces_pass total_faces.


DERIVED: Theorem named 'cubie_is_lattice' in the CubiePostQuantum family -- registry statement: Post-Quantum

Theorem cubie_is_lattice :
  cubie_lattice_isomorphism LATTICE_DIM LATTICE_DIM = true.

theorem cubie_is_lattice :
    cubieLatticeIsomorphism LATTICE_DIM LATTICE_DIM = true


DERIVED: Theorem named 'cubie_mlwe_hardness' in the CubiePostQuantum family -- registry statement: Post-Quantum

Theorem cubie_mlwe_hardness :
  mlwe_hard LATTICE_DIM SECURITY_BITS = true.

theorem cubie_mlwe_hardness :
    mlweHard LATTICE_DIM SECURITY_BITS = true


DERIVED: Theorem named 'face_basis_independence' in the CubiePostQuantum family -- registry statement: Post-Quantum

Theorem face_basis_independence :
  LATTICE_DIM >= 6.

theorem face_basis_independence : LATTICE_DIM ≥ 6


DERIVED: Theorem named 'dimension_security_monotonic' in the CubiePostQuantum family -- registry statement: Post-Quantum

Theorem dimension_security_monotonic :
  forall (dim1 dim2 security : nat),
  dim1 < dim2 -> dim2 >= 54 ->
  mlwe_hard dim1 security = true ->
  mlwe_hard dim2 security = true.


DERIVED: Theorem named 'partial_faces_denied' in the CubiePostQuantum family -- registry statement: Post-Quantum

Theorem partial_faces_denied :
  inside_trust_polytope 5 6 = false.

theorem partial_faces_denied : insideTrustPolytope 5 6 = false


DERIVED: Theorem named 'all_faces_admitted' in the CubiePostQuantum family -- registry statement: Post-Quantum

Theorem all_faces_admitted :
  inside_trust_polytope 6 6 = true.

theorem all_faces_admitted : insideTrustPolytope 6 6 = true


DERIVED: Definition named 'zkstark_valid' in the CubiePostQuantum family -- registry statement: Post-Quantum

Definition zkstark_valid (proof_valid geometry_satisfied witness_hidden : bool) : bool :=
  proof_valid && geometry_satisfied && witness_hidden.


DERIVED: Theorem named 'zkstark_soundness' in the CubiePostQuantum family -- registry statement: Post-Quantum

Theorem zkstark_soundness :
  forall (pv geom hidden : bool),
  zkstark_valid pv geom hidden = true ->
  geom = true.

theorem zkstark_soundness (pv geom hidden : Bool)
    (h : zkStarkValid pv geom hidden = true) :
    geom = true


DERIVED: Theorem named 'zkstark_zero_knowledge' in the CubiePostQuantum family -- registry statement: Post-Quantum

Theorem zkstark_zero_knowledge :
  forall (pv geom hidden : bool),
  zkstark_valid pv geom hidden = true ->
  hidden = true.

theorem zkstark_zero_knowledge (pv geom hidden : Bool)
    (h : zkStarkValid pv geom hidden = true) :
    hidden = true


DERIVED: Definition named 'trustless_verification' in the CubiePostQuantum family -- registry statement: Post-Quantum

Definition trustless_verification (proof_valid control_plane_trusted : bool) : bool :=
  proof_valid.


DERIVED: Theorem named 'stark_trustless' in the CubiePostQuantum family -- registry statement: Post-Quantum

Theorem stark_trustless :
  trustless_verification true false = true.

theorem stark_trustless :
    trustlessVerification true false = true


DERIVED: Definition named 'PLUS_STENCIL_CARDINALITY' in the CubieQApex family -- registry statement: v1.10 CubieQApex

Definition PLUS_STENCIL_CARDINALITY : nat := 5.


DERIVED: Definition named 'ORIENTED_FACE_SITES' in the CubieQApex family -- registry statement: v1.10 CubieQApex

Definition ORIENTED_FACE_SITES      : nat := 54.


DERIVED: Definition named 'GOLDEN_PATH_SITES_N3' in the CubieQApex family -- registry statement: v1.10 CubieQApex

Definition GOLDEN_PATH_SITES_N3     : nat := 125.


DERIVED: Definition named 'CROWD_SITES_N3' in the CubieQApex family -- registry statement: v1.10 CubieQApex

Definition CROWD_SITES_N3           : nat := 19683.


DERIVED: Definition named 'FrameHolonomyValid' in the CubieQApex family -- registry statement: v1.10 CubieQApex

Definition FrameHolonomyValid (Y : Configuration) : Prop :=
  AuthorizedGroup (Holonomy Y).

def FrameHolonomyValid (Y : Configuration) : Prop


DERIVED: Theorem named 'apex_law_I_geometry_beats_cardinality' in the CubieQApex family -- registry statement: v1.10 CubieQApex

Theorem apex_law_I_geometry_beats_cardinality :
  forall Y_aligned Y_crowd,
    PlusStencilAligned Y_aligned ->
    FrameHolonomyValid Y_aligned ->
    aligned_count Y_aligned >= GOLDEN_PATH_SITES_N3 ->
    ~ PlusStencilAligned Y_crowd ->
    aligned_count Y_crowd <= CROWD_SITES_N3 ->
    ReconstructionCapacity Y_aligned >= 1
 /\ ReconstructionCapacity Y_crowd  = 0.

theorem apex_law_I_geometry_beats_cardinality :
  ∀ Y_aligned Y_crowd,
    PlusStencilAligned Y_aligned →
    FrameHolonomyValid Y_aligned →
    aligned_count Y_aligned ≥ GOLDEN_PATH_SITES_N3 →
    ¬ PlusStencilAligned Y_crowd →
    aligned_count Y_crowd ≤ CROWD_SITES_N3 →
    ReconstructionCapacity Y_aligned ≥ 1
  ∧ ReconstructionCapacity Y_crowd  = 0


DERIVED: Theorem named 'apex_law_II_frame_beats_geometry' in the CubieQApex family -- registry statement: v1.10 CubieQApex

Theorem apex_law_II_frame_beats_geometry :
  forall Y1 Y2,
    ActiveGeometry Y1 = ActiveGeometry Y2 ->
    site_count Y1 = site_count Y2 ->
    PlusStencilAligned Y1 ->
    PlusStencilAligned Y2 ->
    FrameHolonomyValid Y1 ->
    ~ FrameHolonomyValid Y2 ->
    ReconstructionCapacity Y2 = 0.

theorem apex_law_II_frame_beats_geometry :
  ∀ Y1 Y2,
    ActiveGeometry Y1 = ActiveGeometry Y2 →
    site_count Y1 = site_count Y2 →
    PlusStencilAligned Y1 →
    PlusStencilAligned Y2 →
    FrameHolonomyValid Y1 →
    ¬ FrameHolonomyValid Y2 →
    ReconstructionCapacity Y2 = 0


DERIVED: Theorem named 'apex_law_IV_recursive_crowd_failure' in the CubieQApex family -- registry statement: v1.10 CubieQApex

Theorem apex_law_IV_recursive_crowd_failure :
  forall Y_crowd Y_golden,
    ~ PlusStencilAligned Y_crowd ->
    aligned_count Y_crowd <= CROWD_SITES_N3 ->
    PlusStencilAligned Y_golden ->
    FrameHolonomyValid Y_golden ->
    aligned_count Y_golden >= GOLDEN_PATH_SITES_N3 ->
    ReconstructionCapacity Y_crowd  = 0
 /\ ReconstructionCapacity Y_golden >= 1.

theorem apex_law_IV_recursive_crowd_failure :
  ∀ Y_crowd Y_golden,
    ¬ PlusStencilAligned Y_crowd →
    aligned_count Y_crowd ≤ CROWD_SITES_N3 →
    PlusStencilAligned Y_golden →
    FrameHolonomyValid Y_golden →
    aligned_count Y_golden ≥ GOLDEN_PATH_SITES_N3 →
    ReconstructionCapacity Y_crowd  = 0
  ∧ ReconstructionCapacity Y_golden ≥ 1


DERIVED: Theorem named 'chain_ok_implies_seamless' in the CubieQApex family -- registry statement: v1.10 CubieQApex

Theorem chain_ok_implies_seamless :
  forall x y rest,
    ChainOK (cons x (cons y rest)) ->
    SeamCompatible x y.

theorem chain_ok_implies_seamless :
  ∀ x y rest, ChainOK (x :: y :: rest) → SeamCompatible x y


DERIVED: Definition named 'L_N' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Definition L_N (N : nat) : nat := 54 ^ N.


DERIVED: Definition named 'golden_path_size' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Definition golden_path_size (N : nat) : nat := 5 ^ N.


DERIVED: Definition named 'crowd_size' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Definition crowd_size (N : nat) : nat := 27 ^ N.


DERIVED: Theorem named 'L_N_at_1' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric


DERIVED: Theorem named 'L_N_at_2' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric


DERIVED: Theorem named 'L_N_at_3' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric


DERIVED: Theorem named 'golden_path_at_1' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem golden_path_at_1 : golden_path_size 1 = 5.


DERIVED: Theorem named 'golden_path_at_2' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem golden_path_at_2 : golden_path_size 2 = 25.


DERIVED: Theorem named 'golden_path_at_3' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem golden_path_at_3 : golden_path_size 3 = 125.


DERIVED: Theorem named 'crowd_at_1' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric


DERIVED: Theorem named 'crowd_at_2' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem crowd_at_2 : crowd_size 2 = 729.


DERIVED: Theorem named 'crowd_at_3' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem crowd_at_3 : crowd_size 3 = 19683.

theorem crowd_at_3 : crowdSize 3 = 19683


DERIVED: Theorem named 'amplification_at_3' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem amplification_at_3 :
  crowd_size 3 = 157 * golden_path_size 3 + 58.

theorem amplification_at_3 :
    crowdSize 3 = 157 * goldenPathSize 3 + 58


DERIVED: Lemma named 'pow_lt_compat_l' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Lemma pow_lt_compat_l : forall a b N, 0 < a -> a < b -> a ^ (S N) < b ^ (S N).


DERIVED: Theorem named 'crowd_exceeds_golden' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem crowd_exceeds_golden :
  forall N : nat, N >= 1 -> crowd_size N > golden_path_size N.

theorem crowd_exceeds_golden :
    ∀ (N : Nat), N ≥ 1 → crowdSize N > goldenPathSize N


DERIVED: Theorem named 'golden_path_below_system' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem golden_path_below_system :
  forall N : nat, N >= 1 -> golden_path_size N < L_N N.


DERIVED: Theorem named 'density_at_3_lower' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem density_at_3_lower :
  Nat.ltb (125 * 1259) 157464 = true.

theorem density_at_3_lower : 125 * 1259 < 157464


DERIVED: Theorem named 'density_at_3_upper' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem density_at_3_upper :
  Nat.ltb 157464 (125 * 1260) = true.

theorem density_at_3_upper : 157464 < 125 * 1260


DERIVED: Theorem named 'density_at_3' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem density_at_3 :
  Nat.ltb (golden_path_size 3 * 1259) (L_N 3) = true /\
  Nat.ltb (L_N 3) (golden_path_size 3 * 1260) = true.

theorem density_at_3 :
    goldenPathSize 3 * 1259 < L_N 3 ∧ L_N 3 < goldenPathSize 3 * 1260


DERIVED: Definition named 'GRG_map' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Definition GRG_map (g : Geometry) : Capacity :=
  match g with
  | Aligned    => Signal
  | Misaligned => Noise
  end.

def GRG_map : Geometry → Capacity
  | Geometry.Aligned    => Capacity.Signal
  | Geometry.Misaligned => Capacity.Noise

/-- The fixed point of the GRG flow under repeated renormalization.
    Constant in N because the GRG_map is a fixed point already. -/
def GRG_flow (g : Geometry) (_N : Nat) : Capacity


DERIVED: Definition named 'GRG_flow' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Definition GRG_flow (g : Geometry) (N : nat) : Capacity :=
  GRG_map g.

def GRG_flow (g : Geometry) (_N : Nat) : Capacity


DERIVED: Theorem named 'aligned_fixed_point' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem aligned_fixed_point :
  forall N : nat, GRG_flow Aligned N = Signal.

theorem aligned_fixed_point :
    ∀ (N : Nat), GRG_flow Geometry.Aligned N = Capacity.Signal


DERIVED: Theorem named 'misaligned_fixed_point' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem misaligned_fixed_point :
  forall N : nat, GRG_flow Misaligned N = Noise.

theorem misaligned_fixed_point :
    ∀ (N : Nat), GRG_flow Geometry.Misaligned N = Capacity.Noise


DERIVED: Theorem named 'fixed_points_orthogonal' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem fixed_points_orthogonal :
  GRG_flow Aligned 100 <> GRG_flow Misaligned 100.

theorem fixed_points_orthogonal :
    GRG_flow Geometry.Aligned 100 ≠ GRG_flow Geometry.Misaligned 100


DERIVED: Definition named 'equal_density_authorization' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Definition equal_density_authorization : nat := 9.


DERIVED: Theorem named 'same_density_different_outcomes' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem same_density_different_outcomes :
  GRG_flow Aligned 3 = Signal /\
  GRG_flow Misaligned 3 = Noise /\
  equal_density_authorization = equal_density_authorization.

theorem same_density_different_outcomes :
    GRG_flow Geometry.Aligned 3 = Capacity.Signal ∧
    GRG_flow Geometry.Misaligned 3 = Capacity.Noise ∧
    equalDensityAuthorization = equalDensityAuthorization


DERIVED: Definition named 'aligned_to_signal' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Definition aligned_to_signal (g : Geometry) : Prop :=
  g = Aligned -> GRG_flow g 0 = Signal.


DERIVED: Theorem named 'aligned_to_signal_holds' in the CubieQGeometric family -- registry statement: v1.13 CubieQGeometric

Theorem aligned_to_signal_holds : forall g, aligned_to_signal g.

theorem aligned_to_signal_holds : ∀ g, alignedToSignal g


DERIVED: Theorem named 'T7_context_dependent_consent' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Theorem T7_context_dependent_consent :
  measure PlusState Computational <> measure PlusState Hadamard.

theorem T7_context_dependent_consent :
    measure PlusState MeasurementBasis.Computational ≠
    measure PlusState MeasurementBasis.Hadamard


DERIVED: Definition named 'commutator_AB' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Definition commutator_AB (s : ConsentState) :
  ConsentOutcome := measure_after s Computational Hadamard.


DERIVED: Definition named 'commutator_BA' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Definition commutator_BA (s : ConsentState) :
  ConsentOutcome := measure_after s Hadamard Computational.


DERIVED: Theorem named 'non_commutativity_holds' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Theorem non_commutativity_holds : exists s, commutator_AB s <> commutator_BA s.

theorem non_commutativity_holds :
    ∃ s, commutator_AB s ≠ commutator_BA s


DERIVED: Definition named 'entanglement_fraction' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Definition entanglement_fraction := nat.  (* 0..100 *)
Definition critical_threshold_classical : nat := 50.


DERIVED: Definition named 'critical_threshold_classical' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Definition critical_threshold_classical : nat := 50.


DERIVED: Definition named 'critical_threshold_quantum' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Definition critical_threshold_quantum (f_ent : nat) : nat :=
  critical_threshold_classical - f_ent / 4.

def critical_threshold_quantum (f_ent : Nat) : Nat


DERIVED: Theorem named 'T6_entanglement_lowers_threshold' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Theorem T6_entanglement_lowers_threshold :
  forall f_ent : nat, f_ent >= 4 ->
  critical_threshold_quantum f_ent < critical_threshold_classical.

theorem T6_entanglement_lowers_threshold :
    ∀ (f_ent : Nat), f_ent ≥ 4 →
    critical_threshold_quantum f_ent < critical_threshold_classical


DERIVED: Theorem named 'T6_full_entanglement_threshold' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Theorem T6_full_entanglement_threshold :
  critical_threshold_quantum 100 = 25.

theorem T6_full_entanglement_threshold :
    critical_threshold_quantum 100 = 25


DERIVED: Theorem named 'T6_half_entanglement_threshold' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Theorem T6_half_entanglement_threshold :
  critical_threshold_quantum 50 = 38.

theorem T6_half_entanglement_threshold :
    critical_threshold_quantum 50 = 38


DERIVED: Theorem named 'T8_holevo_bound_holds' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Theorem T8_holevo_bound_holds :
  accessible_information <= consent_state_entropy.

theorem T8_holevo_bound_holds :
    accessible_information ≤ consent_state_entropy


DERIVED: Definition named 'information_gap' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Definition information_gap : nat :=
  consent_state_entropy - accessible_information.


DERIVED: Theorem named 'information_gap_nonneg' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Theorem information_gap_nonneg :
  consent_state_entropy >= accessible_information.

theorem information_gap_nonneg :
    consent_state_entropy ≥ accessible_information


DERIVED: Theorem named 'T5_collapse_idempotent_holds' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Theorem T5_collapse_idempotent_holds :
  forall s : ConsentState, forall b : MeasurementBasis,
  measure (post_measurement_state s b) b = measure s b.

theorem T5_collapse_idempotent_holds :
    ∀ (s : ConsentState) (b : MeasurementBasis),
      measure (post_measurement_state s b) b = measure s b


DERIVED: Definition named 'post_measurement_agreement' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Definition post_measurement_agreement (s : ConsentState) (b : MeasurementBasis) : Prop :=
  measure (post_measurement_state s b) b = measure s b.

def post_measurement_agreement (s : ConsentState) (b : MeasurementBasis) : Prop


DERIVED: Theorem named 'T5_post_measurement_agreement_universal' in the CubieQuantumConsent family -- registry statement: v1.13 CubieQuantumConsent

Theorem T5_post_measurement_agreement_universal :
  forall s b, post_measurement_agreement s b.

theorem T5_post_measurement_agreement_universal :
    ∀ s b, post_measurement_agreement s b


DERIVED: Definition named 'is_root' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition is_root (n : ConsentNode) : bool :=
  Nat.eqb (parent_id n) 0.


DERIVED: Definition named 'cascading_consent' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition cascading_consent (parent child : ConsentNode) : bool :=
  consent_grant parent && consent_grant child && active parent && active child.

def cascading_consent (parent child : ConsentNode) : Bool


DERIVED: Definition named 'sub_policy_compliant' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition sub_policy_compliant (parent child : ConsentNode) : bool :=
  Nat.leb (sub_policy child) (capacity parent).

def sub_policy_compliant (parent child : ConsentNode) : Bool


DERIVED: Definition named 'channel_valid' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition channel_valid (ch : ConsentChannel)
                         (src dst : ConsentNode) : bool :=
  open ch &&
  active src && active dst &&
  Nat.eqb (node_id src) (src_id ch) &&
  Nat.eqb (node_id dst) (dst_id ch).

def channel_valid (ch : ConsentChannel) (src dst : ConsentNode) : Bool


DERIVED: Definition named 'stabilizer_ok' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition stabilizer_ok (sc : StabilizerCode) : bool :=
  syndrome_valid sc && Nat.ltb 0 (code_distance sc).

def stabilizer_ok (sc : StabilizerCode) : Bool


DERIVED: Definition named 'full_consent_ok' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition full_consent_ok (parent child : ConsentNode)
                           (sc : StabilizerCode) : bool :=
  cascading_consent parent child &&
  sub_policy_compliant parent child &&
  stabilizer_ok sc.

def full_consent_ok (parent child : ConsentNode) (sc : StabilizerCode) : Bool


DERIVED: Theorem named 'conditional_qec_realization' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem conditional_qec_realization :
  forall (parent child : ConsentNode) (sc : StabilizerCode),
  full_consent_ok parent child sc = true ->
  stabilizer_ok sc = true.

theorem conditional_qec_realization (parent child : ConsentNode) (sc : StabilizerCode)
    (h : full_consent_ok parent child sc = true) :
    stabilizer_ok sc = true


DERIVED: Theorem named 'stabilizer_validity' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem stabilizer_validity :
  forall (sc : StabilizerCode),
  code_distance sc = 0 ->
  stabilizer_ok sc = false.

theorem stabilizer_validity (sc : StabilizerCode)
    (h : sc.code_distance = 0) :
    stabilizer_ok sc = false


DERIVED: Theorem named 'stabilizer_positive' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem stabilizer_positive :
  forall (sc : StabilizerCode),
  code_distance sc > 0 ->
  syndrome_valid sc = true ->
  stabilizer_ok sc = true.

theorem stabilizer_positive (sc : StabilizerCode)
    (hdist : sc.code_distance > 0) (hsyn : sc.syndrome_valid = true) :
    stabilizer_ok sc = true


DERIVED: Theorem named 'holevo_bounded_extraction' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem holevo_bounded_extraction :
  forall (parent child : ConsentNode),
  sub_policy_compliant parent child = true ->
  sub_policy child <= capacity parent.

theorem holevo_bounded_extraction (parent child : ConsentNode)
    (h : sub_policy_compliant parent child = true) :
    child.sub_policy ≤ parent.capacity


DERIVED: Theorem named 'extraction_over_capacity_denied' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem extraction_over_capacity_denied :
  forall (parent child : ConsentNode),
  sub_policy child > capacity parent ->
  sub_policy_compliant parent child = false.

theorem extraction_over_capacity_denied (parent child : ConsentNode)
    (h : child.sub_policy > parent.capacity) :
    sub_policy_compliant parent child = false


DERIVED: Theorem named 'measurement_collapse_consent' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem measurement_collapse_consent :
  forall (parent child : ConsentNode),
  active parent = false ->
  cascading_consent parent child = false.

theorem measurement_collapse_consent (parent child : ConsentNode)
    (h : parent.active = false) :
    cascading_consent parent child = false


DERIVED: Theorem named 'cascade_revoke_immediate' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem cascade_revoke_immediate :
  forall (parent child : ConsentNode) (sc : StabilizerCode),
  active parent = false ->
  full_consent_ok parent child sc = false.

theorem cascade_revoke_immediate (parent child : ConsentNode) (sc : StabilizerCode)
    (h : parent.active = false) :
    full_consent_ok parent child sc = false


DERIVED: Theorem named 'entanglement_grant_correlation' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem entanglement_grant_correlation :
  forall (parent child : ConsentNode),
  consent_grant parent = true ->
  consent_grant child = true ->
  active parent = true ->
  active child = true ->
  cascading_consent parent child = true.

theorem entanglement_grant_correlation (parent child : ConsentNode)
    (hp : parent.consent_grant = true) (hc : child.consent_grant = true)
    (ha1 : parent.active = true) (ha2 : child.active = true) :
    cascading_consent parent child = true


DERIVED: Theorem named 'entanglement_revoke_correlation' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem entanglement_revoke_correlation :
  forall (parent child : ConsentNode),
  consent_grant parent = false ->
  cascading_consent parent child = false.

theorem entanglement_revoke_correlation (parent child : ConsentNode)
    (h : parent.consent_grant = false) :
    cascading_consent parent child = false


DERIVED: Definition named 'access_by_relationship' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition access_by_relationship (requestor_depth node_depth : nat) : bool :=
  Nat.leb requestor_depth node_depth.

def access_by_relationship (requestor_depth node_depth : Nat) : Bool


DERIVED: Theorem named 'context_dependent_access' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem context_dependent_access :
  forall (req_depth node_depth : nat),
  req_depth <= node_depth ->
  access_by_relationship req_depth node_depth = true.

theorem context_dependent_access (req_depth node_depth : Nat)
    (h : req_depth ≤ node_depth) :
    access_by_relationship req_depth node_depth = true


DERIVED: Theorem named 'deeper_requestor_denied' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem deeper_requestor_denied :
  forall (req_depth node_depth : nat),
  req_depth > node_depth ->
  access_by_relationship req_depth node_depth = false.

theorem deeper_requestor_denied (req_depth node_depth : Nat)
    (h : req_depth > node_depth) :
    access_by_relationship req_depth node_depth = false


DERIVED: Definition named 'check_cascade_then_policy' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition check_cascade_then_policy (parent child : ConsentNode) : bool :=
  if cascading_consent parent child then sub_policy_compliant parent child
  else false.

def check_cascade_then_policy (parent child : ConsentNode) : Bool


DERIVED: Definition named 'check_policy_then_cascade' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition check_policy_then_cascade (parent child : ConsentNode) : bool :=
  if sub_policy_compliant parent child then cascading_consent parent child
  else false.

def check_policy_then_cascade (parent child : ConsentNode) : Bool


DERIVED: Theorem named 'consent_algebra_agree_on_pass' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem consent_algebra_agree_on_pass :
  forall (parent child : ConsentNode),
  cascading_consent parent child = true ->
  sub_policy_compliant parent child = true ->
  check_cascade_then_policy parent child =
  check_policy_then_cascade parent child.

theorem consent_algebra_agree_on_pass (parent child : ConsentNode)
    (hcasc : cascading_consent parent child = true)
    (hpol : sub_policy_compliant parent child = true) :
    check_cascade_then_policy parent child =
    check_policy_then_cascade parent child


DERIVED: Theorem named 'consent_algebra_cascade_short_circuits' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem consent_algebra_cascade_short_circuits :
  forall (parent child : ConsentNode),
  cascading_consent parent child = false ->
  check_cascade_then_policy parent child = false.

theorem consent_algebra_cascade_short_circuits (parent child : ConsentNode)
    (h : cascading_consent parent child = false) :
    check_cascade_then_policy parent child = false


DERIVED: Theorem named 'consent_channel_requires_active_endpoints' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem consent_channel_requires_active_endpoints :
  forall (ch : ConsentChannel) (src dst : ConsentNode),
  active src = false ->
  channel_valid ch src dst = false.

theorem consent_channel_requires_active_endpoints (ch : ConsentChannel)
    (src dst : ConsentNode) (h : src.active = false) :
    channel_valid ch src dst = false


DERIVED: Theorem named 'consent_channel_bounded' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem consent_channel_bounded :
  forall (ch : ConsentChannel),
  bandwidth ch <= bandwidth ch.


DERIVED: Definition named 'child_can_access_parent' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition child_can_access_parent (ch : ConsentChannel)
                                    (parent child : ConsentNode) : bool :=
  channel_valid ch parent child &&
  cascading_consent parent child.

def child_can_access_parent (ch : ConsentChannel)
    (parent child : ConsentNode) : Bool


DERIVED: Theorem named 'wedge_reconstruction_requires_consent' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem wedge_reconstruction_requires_consent :
  forall (ch : ConsentChannel) (parent child : ConsentNode),
  child_can_access_parent ch parent child = true ->
  cascading_consent parent child = true.

theorem wedge_reconstruction_requires_consent (ch : ConsentChannel)
    (parent child : ConsentNode)
    (h : child_can_access_parent ch parent child = true) :
    cascading_consent parent child = true


DERIVED: Theorem named 'wedge_reconstruction_requires_channel' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem wedge_reconstruction_requires_channel :
  forall (ch : ConsentChannel) (parent child : ConsentNode),
  child_can_access_parent ch parent child = true ->
  channel_valid ch parent child = true.

theorem wedge_reconstruction_requires_channel (ch : ConsentChannel)
    (parent child : ConsentNode)
    (h : child_can_access_parent ch parent child = true) :
    channel_valid ch parent child = true


DERIVED: Definition named 'percolation_threshold' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition percolation_threshold := nat.


DERIVED: Definition named 'percolates' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition percolates (ch : ConsentChannel) (threshold : nat) : bool :=
  Nat.leb threshold (bandwidth ch) && open ch.

def percolates (ch : ConsentChannel) (threshold : Nat) : Bool


DERIVED: Theorem named 'below_threshold_no_flow' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem below_threshold_no_flow :
  forall (ch : ConsentChannel) (threshold : nat),
  bandwidth ch < threshold ->
  percolates ch threshold = false.

theorem below_threshold_no_flow (ch : ConsentChannel) (threshold : Nat)
    (h : ch.bandwidth < threshold) :
    percolates ch threshold = false


DERIVED: Theorem named 'above_threshold_flows' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem above_threshold_flows :
  forall (ch : ConsentChannel) (threshold : nat),
  bandwidth ch >= threshold ->
  open ch = true ->
  percolates ch threshold = true.

theorem above_threshold_flows (ch : ConsentChannel) (threshold : Nat)
    (hge : ch.bandwidth ≥ threshold) (hopen : ch.is_open = true) :
    percolates ch threshold = true


DERIVED: Definition named 'capacity_available' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition capacity_available (node : ConsentNode) (current_children : nat) : bool :=
  Nat.ltb current_children (capacity node).

def capacity_available (node : ConsentNode) (current_children : Nat) : Bool


DERIVED: Theorem named 'capacity_exhausted_denies' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem capacity_exhausted_denies :
  forall (node : ConsentNode) (current_children : nat),
  current_children >= capacity node ->
  capacity_available node current_children = false.

theorem capacity_exhausted_denies (node : ConsentNode) (cc : Nat)
    (h : cc ≥ node.capacity) :
    capacity_available node cc = false


DERIVED: Theorem named 'capacity_available_allows' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem capacity_available_allows :
  forall (node : ConsentNode) (current_children : nat),
  current_children < capacity node ->
  capacity_available node current_children = true.

theorem capacity_available_allows (node : ConsentNode) (cc : Nat)
    (h : cc < node.capacity) :
    capacity_available node cc = true


DERIVED: Definition named 'can_modify_preferences' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition can_modify_preferences (requestor node : ConsentNode) : bool :=
  active node &&
  Nat.leb (depth requestor) (depth node).

def can_modify_preferences (requestor node : ConsentNode) : Bool


DERIVED: Theorem named 'inactive_node_no_modification' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem inactive_node_no_modification :
  forall (requestor node : ConsentNode),
  active node = false ->
  can_modify_preferences requestor node = false.

theorem inactive_node_no_modification (requestor node : ConsentNode)
    (h : node.active = false) :
    can_modify_preferences requestor node = false


DERIVED: Theorem named 'deeper_requestor_no_modification' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem deeper_requestor_no_modification :
  forall (requestor node : ConsentNode),
  depth requestor > depth node ->
  can_modify_preferences requestor node = false.

theorem deeper_requestor_no_modification (requestor node : ConsentNode)
    (h : requestor.depth > node.depth) :
    can_modify_preferences requestor node = false


DERIVED: Theorem named 'authorized_modification' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem authorized_modification :
  forall (requestor node : ConsentNode),
  active node = true ->
  depth requestor <= depth node ->
  can_modify_preferences requestor node = true.

theorem authorized_modification (requestor node : ConsentNode)
    (hactive : node.active = true) (hle : requestor.depth ≤ node.depth) :
    can_modify_preferences requestor node = true


DERIVED: Definition named 'effective_sub_policy' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition effective_sub_policy (parent child : ConsentNode) : nat :=
  Nat.min (sub_policy child) (capacity parent).

def effective_sub_policy (parent child : ConsentNode) : Nat


DERIVED: Theorem named 'effective_policy_bounded_by_parent' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem effective_policy_bounded_by_parent :
  forall (parent child : ConsentNode),
  effective_sub_policy parent child <= capacity parent.

theorem effective_policy_bounded_by_parent (parent child : ConsentNode) :
    effective_sub_policy parent child ≤ parent.capacity


DERIVED: Theorem named 'effective_policy_bounded_by_child' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem effective_policy_bounded_by_child :
  forall (parent child : ConsentNode),
  effective_sub_policy parent child <= sub_policy child.

theorem effective_policy_bounded_by_child (parent child : ConsentNode) :
    effective_sub_policy parent child ≤ child.sub_policy


DERIVED: Theorem named 'dynamic_mixing_constrains' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem dynamic_mixing_constrains :
  forall (child : ConsentNode) (cap1 cap2 : nat),
  cap1 < cap2 ->
  Nat.min (sub_policy child) cap1 <= Nat.min (sub_policy child) cap2.

theorem dynamic_mixing_constrains (child : ConsentNode) (cap1 cap2 : Nat)
    (h : cap1 < cap2) :
    min child.sub_policy cap1 ≤ min child.sub_policy cap2


DERIVED: Fixpoint named 'sum_sub_policies' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

def sum_sub_policies : List ConsentNode → Nat
  | [] => 0
  | n :: rest => n.sub_policy + sum_sub_policies rest

def graph_within_capacity (root : ConsentNode) (children : List ConsentNode) : Bool


DERIVED: Definition named 'graph_within_capacity' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Definition graph_within_capacity (root : ConsentNode)
                                  (children : list ConsentNode) : bool :=
  Nat.leb (sum_sub_policies children) (capacity root).

def graph_within_capacity (root : ConsentNode) (children : List ConsentNode) : Bool


DERIVED: Theorem named 'empty_graph_within_capacity' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem empty_graph_within_capacity :
  forall (root : ConsentNode),
  graph_within_capacity root [] = true.

theorem empty_graph_within_capacity (root : ConsentNode) :
    graph_within_capacity root [] = true


DERIVED: Theorem named 'overloaded_graph_denied' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem overloaded_graph_denied :
  forall (root : ConsentNode) (children : list ConsentNode),
  sum_sub_policies children > capacity root ->
  graph_within_capacity root children = false.

theorem overloaded_graph_denied (root : ConsentNode) (children : List ConsentNode)
    (h : sum_sub_policies children > root.capacity) :
    graph_within_capacity root children = false


DERIVED: Theorem named 'adding_child_increases_demand' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem adding_child_increases_demand :
  forall (child : ConsentNode) (rest : list ConsentNode),
  sum_sub_policies (child :: rest) = sub_policy child + sum_sub_policies rest.

theorem adding_child_increases_demand (child : ConsentNode) (rest : List ConsentNode) :
    sum_sub_policies (child :: rest) = child.sub_policy + sum_sub_policies rest


DERIVED: Theorem named 'one_more_child_overflows' in the CubieQuantumConsentAdvanced family -- registry statement: Quantum Consent Advanced

Theorem one_more_child_overflows :
  forall (root : ConsentNode) (children : list ConsentNode) (new_child : ConsentNode),
  sum_sub_policies children = capacity root ->
  sub_policy new_child > 0 ->
  graph_within_capacity root (new_child :: children) = false.

theorem one_more_child_overflows (root : ConsentNode) (children : List ConsentNode)
    (new_child : ConsentNode) (heq : sum_sub_policies children = root.capacity)
    (hpos : new_child.sub_policy > 0) :
    graph_within_capacity root (new_child :: children) = false


DERIVED: Definition named 'GOLDEN_PATH_SITES_N3' in the CubieQv14 family -- registry statement: v1.10 CubieQv14

Definition GOLDEN_PATH_SITES_N3 : nat := 125.


DERIVED: Definition named 'CROWD_SITES_N3' in the CubieQv14 family -- registry statement: v1.10 CubieQv14

Definition CROWD_SITES_N3       : nat := 19683.


DERIVED: Definition named 'GODS_NUMBER' in the CubieQv14 family -- registry statement: v1.10 CubieQv14

Definition GODS_NUMBER          : nat := 20.


DERIVED: Theorem named 'apex_law_I_geometry_beats_cardinality_general' in the CubieQv14 family -- registry statement: v1.10 CubieQv14

Theorem apex_law_I_geometry_beats_cardinality_general :
  forall (P : Pattern) (Y_aligned Y_crowd : Configuration),
    pattern_aligned P Y_aligned ->
    Holonomy_valid Y_aligned ->
    aligned_count Y_aligned >= GOLDEN_PATH_SITES_N3 ->
    ~ pattern_aligned P Y_crowd ->
    aligned_count Y_crowd <= CROWD_SITES_N3 ->
    ReconstructionCapacity Y_aligned >= 1
 /\ ReconstructionCapacity Y_crowd  = 0.

theorem apex_law_I_geometry_beats_cardinality_general :
  ∀ (P : Pattern) (Y_aligned Y_crowd : Configuration),
    pattern_aligned P Y_aligned →
    Holonomy_valid Y_aligned →
    aligned_count Y_aligned ≥ GOLDEN_PATH_SITES_N3 →
    ¬ pattern_aligned P Y_crowd →
    aligned_count Y_crowd ≤ CROWD_SITES_N3 →
    ReconstructionCapacity Y_aligned ≥ 1
  ∧ ReconstructionCapacity Y_crowd  = 0


DERIVED: Theorem named 'read_gate_independent_of_write_gate' in the CubieQv14 family -- registry statement: v1.10 CubieQv14

Theorem read_gate_independent_of_write_gate :
  forall (Y : Configuration) (p : Principal) (a : Axis),
    (ReadGateAuthorized Y p \/ ~ ReadGateAuthorized Y p) ->
    (WriteGateAuthorized Y p a \/ ~ WriteGateAuthorized Y p a) ->
       (ReadGateAuthorized Y p /\ WriteGateAuthorized Y p a)
    \/ (ReadGateAuthorized Y p /\ ~ WriteGateAuthorized Y p a)
    \/ (~ ReadGateAuthorized Y p /\ WriteGateAuthorized Y p a)
    \/ (~ ReadGateAuthorized Y p /\ ~ WriteGateAuthorized Y p a).

theorem read_gate_independent_of_write_gate :
  ∀ (Y : Configuration) (p : Principal) (a : Axis),
    (ReadGateAuthorized Y p ∨ ¬ ReadGateAuthorized Y p) →
    (WriteGateAuthorized Y p a ∨ ¬ WriteGateAuthorized Y p a) →
       (ReadGateAuthorized Y p ∧ WriteGateAuthorized Y p a)
    ∨ (ReadGateAuthorized Y p ∧ ¬ WriteGateAuthorized Y p a)
    ∨ (¬ ReadGateAuthorized Y p ∧ WriteGateAuthorized Y p a)
    ∨ (¬ ReadGateAuthorized Y p ∧ ¬ WriteGateAuthorized Y p a)


DERIVED: Theorem named 'cayley_distance_bounded' in the CubieQv14 family -- registry statement: v1.10 CubieQv14

Theorem cayley_distance_bounded :
  forall Y, cayley_distance Y <= 20.

theorem cayley_distance_bounded :
  ∀ Y, cayley_distance Y ≤ 20


DERIVED: Theorem named 'cayley_distance_fits_u8' in the CubieQv14 family -- registry statement: v1.10 CubieQv14

Theorem cayley_distance_fits_u8 :
  forall Y, cayley_distance Y <= 255.

theorem cayley_distance_fits_u8 :
  ∀ Y, cayley_distance Y ≤ 255


DERIVED: Theorem named 'linear_discipline_no_double_consume' in the CubieQv14 family -- registry statement: v1.10 CubieQv14

Theorem linear_discipline_no_double_consume :
  forall lp, consumed (consume (consume lp)) = true.

theorem linear_discipline_no_double_consume :
  ∀ lp, consumed (consume (consume lp)) = true


DERIVED: Theorem named 'linear_discipline_monotone' in the CubieQv14 family -- registry statement: v1.10 CubieQv14

Theorem linear_discipline_monotone :
  forall lp n,
    consumed (Nat.iter (S n) consume lp) = true.

theorem linear_discipline_monotone :
  ∀ lp n, consumed (iter_consume (n + 1) lp) = true


DERIVED: Theorem named 'stochastic_handoff_vrf_reproducible' in the CubieQv14 family -- registry statement: v1.10 CubieQv14

Theorem stochastic_handoff_vrf_reproducible :
  forall (s : Seed),
    vrf_select s = vrf_select s.

theorem stochastic_handoff_vrf_reproducible :
  ∀ (s : Seed), vrf_select s = vrf_select s


DERIVED: Theorem named 'vrf_audit_reproducible' in the CubieQv14 family -- registry statement: v1.10 CubieQv14

Theorem vrf_audit_reproducible :
  forall (s1 s2 : Seed),
    s1 = s2 -> vrf_select s1 = vrf_select s2.

theorem vrf_audit_reproducible :
  ∀ (s1 s2 : Seed), s1 = s2 → vrf_select s1 = vrf_select s2


DERIVED: Definition named 'intra_chip_stable' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Definition intra_chip_stable (noise_bits total_bits epsilon_pct : nat) : bool :=
  Nat.ltb 0 total_bits && Nat.ltb (noise_bits * 100) (epsilon_pct * total_bits).


DERIVED: Definition named 'inter_chip_unique' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Definition inter_chip_unique (diff_bits total_bits : nat) : bool :=
  Nat.ltb 0 total_bits
  && Nat.leb (50 * total_bits) (diff_bits * 100)
  && Nat.leb (diff_bits * 100) (60 * total_bits).


DERIVED: Theorem named 'puf_intra_chip_reproducible' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Theorem puf_intra_chip_reproducible :
  intra_chip_stable 12 256 5 = true.

theorem puf_intra_chip_reproducible :
    intraChipStable 12 256 5 = true


DERIVED: Theorem named 'puf_inter_chip_unique' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Theorem puf_inter_chip_unique :
  inter_chip_unique 128 256 = true.

theorem puf_inter_chip_unique :
    interChipUnique 128 256 = true


DERIVED: Theorem named 'puf_clone_detected' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Theorem puf_clone_detected :
  forall (diff_bits total_bits : nat),
  inter_chip_unique diff_bits total_bits = true ->
  40 * total_bits <= diff_bits * 100.

theorem puf_clone_detected (diffBits totalBits : Nat)
    (h : interChipUnique diffBits totalBits = true) :
    diffBits * 100 ≥ 40 * totalBits


DERIVED: Definition named 'thermal_signature_valid' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Definition thermal_signature_valid (delta_t_micro_k power_draw_mw : nat)
    (thermal_mass_valid : bool) : bool :=
  thermal_mass_valid && Nat.ltb 0 power_draw_mw && Nat.ltb 0 delta_t_micro_k.


DERIVED: Definition named 'thermal_unforgeable' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Definition thermal_unforgeable (chip_thermal sim_thermal : nat) : bool :=
  negb (Nat.eqb chip_thermal sim_thermal).


DERIVED: Theorem named 'execution_produces_thermal' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Theorem execution_produces_thermal :
  forall (delta_t power : nat),
  delta_t > 0 -> power > 0 ->
  thermal_signature_valid delta_t power true = true.

theorem execution_produces_thermal (deltaT power : Nat)
    (hd : deltaT > 0) (hp : power > 0) :
    thermalSignatureValid deltaT power true = true


DERIVED: Theorem named 'simulator_thermal_mismatch' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Theorem simulator_thermal_mismatch :
  forall (enclave xeon : nat),
  enclave <> xeon ->
  thermal_unforgeable enclave xeon = true.

theorem simulator_thermal_mismatch (enclave xeon : Nat) (h : enclave ≠ xeon) :
    thermalUnforgeable enclave xeon = true


DERIVED: Theorem named 'hardware_clock_monotonicity' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Theorem hardware_clock_monotonicity :
  forall (t1 t2 c1 c2 : nat),
  t1 <= t2 -> c1 <= c2 ->
  c1 <= c2.

theorem hardware_clock_monotonicity (t1 t2 c1 c2 : Nat)
    (ht : t1 ≤ t2) (hc : c1 ≤ c2) :
    clockMonotonic t1 t2 c1 c2


DERIVED: Theorem named 'irreversible_expiry' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Theorem irreversible_expiry :
  forall (t1 t2 c1 c2 expiry : nat),
  t1 <= t2 -> c1 <= c2 -> c1 > expiry ->
  c2 > expiry.

theorem irreversible_expiry (t1 t2 c1 c2 expiry : Nat)
    (ht : t1 ≤ t2) (hc : c1 ≤ c2) (hexp : c1 > expiry) :
    c2 > expiry


DERIVED: Definition named 'GATE_LATENCY_NS' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Definition GATE_LATENCY_NS : nat := 734.


DERIVED: Definition named 'PREGATE_LATENCY_NS' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Definition PREGATE_LATENCY_NS : nat := 5.


DERIVED: Definition named 'HMAC_LATENCY_NS' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Definition HMAC_LATENCY_NS : nat := 710.


DERIVED: Theorem named 'pregate_faster_than_hmac' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Theorem pregate_faster_than_hmac :
  PREGATE_LATENCY_NS < HMAC_LATENCY_NS.

theorem pregate_faster_than_hmac : PREGATE_LATENCY_NS < HMAC_LATENCY_NS


DERIVED: Theorem named 'dos_protection_factor' in the CubieSiliconProvenance family -- registry statement: Silicon Provenance

Theorem dos_protection_factor :
  HMAC_LATENCY_NS / PREGATE_LATENCY_NS >= 100.

theorem dos_protection_factor : HMAC_LATENCY_NS / PREGATE_LATENCY_NS ≥ 100


DERIVED: Definition named 'is_center_site' in the CubieSiteTopology_v4 family -- registry statement: V4 Site Topology

Definition is_center_site (s : CubieSiteTuple) : bool :=
  Nat.eqb (site_row s) 1 && Nat.eqb (site_col s) 1.

def is_center_site (s : CubieSiteTuple) : Bool


DERIVED: Definition named 'is_boundary_site' in the CubieSiteTopology_v4 family -- registry statement: V4 Site Topology

Definition is_boundary_site (s : CubieSiteTuple) : bool :=
  negb (is_center_site s).

def is_boundary_site (s : CubieSiteTuple) : Bool


DERIVED: Definition named 'cubie_site_tuple' in the CubieSiteTopology_v4 family -- registry statement: V4 Site Topology

Definition cubie_site_tuple (s : CubieSiteTuple) : bool :=
  Nat.ltb (site_face s) 6 &&
  Nat.ltb (site_row s) 3  &&
  Nat.ltb (site_col s) 3.

def cubie_site_tuple (s : CubieSiteTuple) : Bool


DERIVED: Lemma named 'boundary_site_fraction' in the CubieSiteTopology_v4 family -- registry statement: V4 Site Topology

Lemma boundary_site_fraction :
  8 * 6 = 48 /\   (* 8 boundary positions per face × 6 faces *)
  1 * 6 = 6  /\   (* 1 center per face × 6 faces *)
  48 + 6 = 54.    (* boundary + center = total facelets *)
Proof.

theorem boundary_site_fraction :
    8 * 6 = 48 ∧   -- 8 boundary positions per face × 6 faces
    1 * 6 = 6  ∧   -- 1 center per face × 6 faces
    48 + 6 = 54


DERIVED: Lemma named 'center_and_boundary_partition' in the CubieSiteTopology_v4 family -- registry statement: V4 Site Topology

Lemma center_and_boundary_partition : forall (s : CubieSiteTuple),
  is_center_site s = true <-> is_boundary_site s = false.


DERIVED: Lemma named 'valid_site_face_in_range' in the CubieSiteTopology_v4 family -- registry statement: V4 Site Topology

Lemma valid_site_face_in_range : forall (s : CubieSiteTuple),
  cubie_site_tuple s = true ->
  site_face s < 6.

theorem valid_site_face_in_range (s : CubieSiteTuple)
    (h : cubie_site_tuple s = true) :
    s.site_face < 6


DERIVED: Definition named 'PENALTY_COUNTER_ADDR' in the CubieTarpitV2_5 family -- registry statement: V2.5 Tarpit

Definition PENALTY_COUNTER_ADDR : nat := 0x0A000000.


DERIVED: Definition named 'TIMER_DELAY_REG' in the CubieTarpitV2_5 family -- registry statement: V2.5 Tarpit

Definition TIMER_DELAY_REG      : nat := 0x40020010.


DERIVED: Definition named 'MAX_PENALTY_EXPONENT' in the CubieTarpitV2_5 family -- registry statement: V2.5 Tarpit

Definition MAX_PENALTY_EXPONENT : nat := 15.


DERIVED: Definition named 'TCM_SCRUB_BASE' in the CubieTarpitV2_5 family -- registry statement: V2.5 Tarpit

Definition TCM_SCRUB_BASE       : nat := 0x08004000.


DERIVED: Definition named 'TCM_SCRUB_SIZE' in the CubieTarpitV2_5 family -- registry statement: V2.5 Tarpit

Definition TCM_SCRUB_SIZE       : nat := 48 * 1024.


DERIVED: Definition named 'backoff_delay' in the CubieTarpitV2_5 family -- registry statement: V2.5 Tarpit

Definition backoff_delay (n : nat) : nat := 2 ^ n.


DERIVED: Definition named 'penalty_successor' in the CubieTarpitV2_5 family -- registry statement: V2.5 Tarpit

Definition penalty_successor (p : PenaltyState) : PenaltyState :=
  if Nat.ltb (exponent p) MAX_PENALTY_EXPONENT
  then mkPenalty (exponent p + 1)
  else mkPenalty MAX_PENALTY_EXPONENT.

def penalty_successor (p : PenaltyState) : PenaltyState


DERIVED: Fixpoint named 'apply_n_backoffs' in the CubieTarpitV2_5 family -- registry statement: V2.5 Tarpit

def apply_n_backoffs (initial : PenaltyState) : Nat → PenaltyState
  | 0     => initial
  | n + 1 => penalty_successor (apply_n_backoffs initial n)

/-- After scrub, all bytes are zero -/
def after_scrub (_ : ScrubState) : ScrubState


DERIVED: Definition named 'after_scrub' in the CubieTarpitV2_5 family -- registry statement: V2.5 Tarpit

Definition after_scrub (_ : ScrubState) : ScrubState :=
  mkScrub true.

def after_scrub (_ : ScrubState) : ScrubState


DERIVED: Theorem named 'cub_0888_tarpit_backoff_strictly_increasing' in the CubieTarpitV2_5 family -- registry statement: V2.5 Tarpit

Theorem cub_0888_tarpit_backoff_strictly_increasing :
  forall (p : PenaltyState),
    exponent p < MAX_PENALTY_EXPONENT ->
    backoff_delay (exponent (penalty_successor p)) =
    2 * backoff_delay (exponent p).

theorem cub_0888_tarpit_backoff_strictly_increasing (p : PenaltyState)
    (h : p.exponent < MAX_PENALTY_EXPONENT) :
    backoff_delay (penalty_successor p).exponent = 2 * backoff_delay p.exponent


DERIVED: Theorem named 'cub_0889_tarpit_halt_is_terminal' in the CubieTarpitV2_5 family -- registry statement: V2.5 Tarpit

Theorem cub_0889_tarpit_halt_is_terminal :
  forall (halted : bool) (admit_count : nat),
    halted = true ->
    admit_count = 0 ->
    admit_count = 0.

theorem cub_0889_tarpit_halt_is_terminal
    (halted : Bool) (admit_count : Nat)
    (h_halted : halted = true) (h_admits : admit_count = 0) :
    admit_count = 0


DERIVED: Theorem named 'cub_0890_tarpit_sram_wipe_completeness' in the CubieTarpitV2_5 family -- registry statement: V2.5 Tarpit

Theorem cub_0890_tarpit_sram_wipe_completeness :
  forall (pre : ScrubState),
    all_zeroed (after_scrub pre) = true.

theorem cub_0890_tarpit_sram_wipe_completeness (pre : ScrubState) :
    (after_scrub pre).all_zeroed = true


DERIVED: Lemma named 'apply_n_backoffs_exponent_bounded' in the CubieTarpitV2_5 family -- registry statement: V2.5 Tarpit

Lemma apply_n_backoffs_exponent_bounded :
  forall (initial : PenaltyState) (n : nat),
    exponent initial <= MAX_PENALTY_EXPONENT ->
    exponent (apply_n_backoffs initial n) <= MAX_PENALTY_EXPONENT.

theorem apply_n_backoffs_exponent_bounded (initial : PenaltyState) (n : Nat) :
    (apply_n_backoffs initial n).exponent ≤ MAX_PENALTY_EXPONENT


DERIVED: Theorem named 'cub_0891_tarpit_max_backoff_bounded' in the CubieTarpitV2_5 family -- registry statement: V2.5 Tarpit

Theorem cub_0891_tarpit_max_backoff_bounded :
  forall (initial : PenaltyState) (n : nat),
    exponent initial <= MAX_PENALTY_EXPONENT ->
    exponent (apply_n_backoffs initial n) <= MAX_PENALTY_EXPONENT /\
    backoff_delay (exponent (apply_n_backoffs initial n)) <= backoff_delay MAX_PENALTY_EXPONENT.

theorem cub_0891_tarpit_max_backoff_bounded (initial : PenaltyState) (n : Nat) :
    (apply_n_backoffs initial n).exponent ≤ MAX_PENALTY_EXPONENT ∧
    backoff_delay (apply_n_backoffs initial n).exponent ≤ backoff_delay MAX_PENALTY_EXPONENT


DERIVED: Definition named 'CELLS_PER_FACE' in the CubieTopologyCollapse family -- registry statement: Topology Collapse


DERIVED: Definition named 'TOTAL_FACES' in the CubieTopologyCollapse family -- registry statement: Topology Collapse


DERIVED: Definition named 'LATTICE_DIM' in the CubieTopologyCollapse family -- registry statement: Topology Collapse


DERIVED: Definition named 'TOTAL_SEAMS' in the CubieTopologyCollapse family -- registry statement: Topology Collapse


DERIVED: Definition named 'TOTAL_VERTICES' in the CubieTopologyCollapse family -- registry statement: Topology Collapse


DERIVED: Definition named 'TrustPolytope' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Definition TrustPolytope := Face -> bool.


DERIVED: Definition named 'countFaces' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Definition countFaces (p : TrustPolytope) : nat :=
  (if p FaceWho   then 1 else 0) +
  (if p FaceWhat  then 1 else 0) +
  (if p FaceHow   then 1 else 0) +
  (if p FaceWhere then 1 else 0) +
  (if p FaceWhen  then 1 else 0) +
  (if p FaceWhy   then 1 else 0).

def countFaces (p : TrustPolytope) : Nat


DERIVED: Definition named 'totalDimensions' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Definition totalDimensions (p : TrustPolytope) : nat :=
  countFaces p * CELLS_PER_FACE.

def totalDimensions (p : TrustPolytope) : Nat


DERIVED: Definition named 'countSeams' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Definition countSeams (p : TrustPolytope) : nat :=
  (* Tier 1: Strong *)
  (if andb (p FaceWho)   (p FaceWhen)  then 1 else 0) +
  (if andb (p FaceWhere) (p FaceWhy)   then 1 else 0) +
  (if andb (p FaceWhat)  (p FaceWhen)  then 1 else 0) +
  (if andb (p FaceHow)   (p FaceWhy)   then 1 else 0) +
  (* Tier 2: Moderate *)
  (if andb (p FaceWho)   (p FaceWhat)  then 1 else 0) +
  (if andb (p FaceWhere) (p FaceWhen)  then 1 else 0) +
  (if andb (p FaceWho)   (p FaceWhy)   then 1 else 0) +
  (if andb (p FaceWhere) (p FaceHow)   then 1 else 0) +
  (* Tier 3: Correlated *)
  (if andb (p FaceWho)   (p FaceHow)   then 1 else 0) +
  (if andb (p FaceWhere) (p FaceWhat)  then 1 else 0) +
  (if andb (p FaceWhat)  (p FaceWhy)   then 1 else 0) +
  (if andb (p FaceHow)   (p FaceWhen)  then 1 else 0).

def countSeams (p : TrustPolytope) : Nat


DERIVED: Definition named 'countVertices' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Definition countVertices (p : TrustPolytope) : nat :=
  (* Front 4 (WHO-anchored) *)
  (if andb (p FaceWho) (andb (p FaceWhy)  (p FaceWhat)) then 1 else 0) +
  (if andb (p FaceWho) (andb (p FaceWhy)  (p FaceHow))  then 1 else 0) +
  (if andb (p FaceWho) (andb (p FaceWhen) (p FaceWhat)) then 1 else 0) +
  (if andb (p FaceWho) (andb (p FaceWhen) (p FaceHow))  then 1 else 0) +
  (* Back 4 (WHERE-anchored) *)
  (if andb (p FaceWhere) (andb (p FaceWhy)  (p FaceWhat)) then 1 else 0) +
  (if andb (p FaceWhere) (andb (p FaceWhy)  (p FaceHow))  then 1 else 0) +
  (if andb (p FaceWhere) (andb (p FaceWhen) (p FaceWhat)) then 1 else 0) +
  (if andb (p FaceWhere) (andb (p FaceWhen) (p FaceHow))  then 1 else 0).

def countVertices (p : TrustPolytope) : Nat


DERIVED: Definition named 'allTrue' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Definition allTrue  : TrustPolytope := fun _ => true.


DERIVED: Definition named 'allFalse' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Definition allFalse : TrustPolytope := fun _ => false.


DERIVED: Definition named 'noWho' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Definition noWho : TrustPolytope := fun f =>
  match f with | FaceWho => false | _ => true end.


DERIVED: Definition named 'noWhere' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Definition noWhere : TrustPolytope := fun f =>
  match f with | FaceWhere => false | _ => true end.


DERIVED: Definition named 'noWhoWhere' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Definition noWhoWhere : TrustPolytope := fun f =>
  match f with | FaceWho => false | FaceWhere => false | _ => true end.


DERIVED: Definition named 'noWhyWhen' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Definition noWhyWhen : TrustPolytope := fun f =>
  match f with | FaceWhy => false | FaceWhen => false | _ => true end.


DERIVED: Definition named 'noWhatHow' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Definition noWhatHow : TrustPolytope := fun f =>
  match f with | FaceWhat => false | FaceHow => false | _ => true end.


DERIVED: Theorem named 'geometric_collapse_solves_n54' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem geometric_collapse_solves_n54 :
  totalDimensions allTrue = LATTICE_DIM.

theorem geometric_collapse_solves_n54 :
    totalDimensions allTrue = LATTICE_DIM


DERIVED: Theorem named 'single_failure_shatters_polytope' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem single_failure_shatters_polytope :
  totalDimensions noWho <> LATTICE_DIM.

theorem single_failure_shatters_polytope :
    totalDimensions noWho ≠ LATTICE_DIM


DERIVED: Theorem named 'shatter_drops_to_45' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem shatter_drops_to_45 :
  totalDimensions noWho = 45.

theorem shatter_drops_to_45 :
    totalDimensions noWho = 45


DERIVED: Theorem named 'shatter_drops_to_45_where' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem shatter_drops_to_45_where :
  totalDimensions noWhere = 45.

theorem shatter_drops_to_45_where :
    totalDimensions noWhere = 45


DERIVED: Theorem named 'opposite_pair_drops_to_36' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem opposite_pair_drops_to_36 :
  totalDimensions noWhoWhere = 36.

theorem opposite_pair_drops_to_36 :
    totalDimensions noWhoWhere = 36


DERIVED: Theorem named 'zero_state_is_empty' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem zero_state_is_empty :
  totalDimensions allFalse = 0.

theorem zero_state_is_empty :
    totalDimensions allFalse = 0


DERIVED: Theorem named 'dimensional_integrity_all' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem dimensional_integrity_all :
  totalDimensions allTrue mod CELLS_PER_FACE = 0.

theorem dimensional_integrity_all :
    totalDimensions allTrue % CELLS_PER_FACE = 0


DERIVED: Theorem named 'dimensional_integrity_five' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem dimensional_integrity_five :
  totalDimensions noWho mod CELLS_PER_FACE = 0.

theorem dimensional_integrity_five :
    totalDimensions noWho % CELLS_PER_FACE = 0


DERIVED: Theorem named 'seams_at_full_is_12' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem seams_at_full_is_12 :
  countSeams allTrue = TOTAL_SEAMS.

theorem seams_at_full_is_12 :
    countSeams allTrue = TOTAL_SEAMS


DERIVED: Theorem named 'single_fail_breaks_4_seams' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem single_fail_breaks_4_seams :
  countSeams noWho = 8.

theorem single_fail_breaks_4_seams :
    countSeams noWho = 8


DERIVED: Theorem named 'opposite_pair_seams' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem opposite_pair_seams :
  countSeams noWhoWhere = 4.

theorem opposite_pair_seams :
    countSeams noWhoWhere = 4


DERIVED: Theorem named 'zero_seams' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem zero_seams :
  countSeams allFalse = 0.

theorem zero_seams :
    countSeams allFalse = 0


DERIVED: Theorem named 'vertices_at_full_is_8' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem vertices_at_full_is_8 :
  countVertices allTrue = TOTAL_VERTICES.

theorem vertices_at_full_is_8 :
    countVertices allTrue = TOTAL_VERTICES


DERIVED: Theorem named 'single_fail_breaks_4_vertices' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem single_fail_breaks_4_vertices :
  countVertices noWho = 4.

theorem single_fail_breaks_4_vertices :
    countVertices noWho = 4


DERIVED: Theorem named 'opposite_fail_breaks_all_vertices_who_where' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem opposite_fail_breaks_all_vertices_who_where :
  countVertices noWhoWhere = 0.

theorem opposite_fail_breaks_all_vertices_who_where :
    countVertices noWhoWhere = 0


DERIVED: Theorem named 'opposite_fail_breaks_all_vertices_why_when' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem opposite_fail_breaks_all_vertices_why_when :
  countVertices noWhyWhen = 0.

theorem opposite_fail_breaks_all_vertices_why_when :
    countVertices noWhyWhen = 0


DERIVED: Theorem named 'opposite_fail_breaks_all_vertices_what_how' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem opposite_fail_breaks_all_vertices_what_how :
  countVertices noWhatHow = 0.

theorem opposite_fail_breaks_all_vertices_what_how :
    countVertices noWhatHow = 0


DERIVED: Theorem named 'zero_vertices' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem zero_vertices :
  countVertices allFalse = 0.

theorem zero_vertices :
    countVertices allFalse = 0


DERIVED: Theorem named 'single_fail_symmetric' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem single_fail_symmetric :
  countVertices noWhere = 4.

theorem single_fail_symmetric :
    countVertices noWhere = 4


DERIVED: Theorem named 'face_count_all' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem face_count_all :
  countFaces allTrue = TOTAL_FACES.

theorem face_count_all : countFaces allTrue = TOTAL_FACES


DERIVED: Theorem named 'face_count_zero' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem face_count_zero :
  countFaces allFalse = 0.

theorem face_count_zero : countFaces allFalse = 0


DERIVED: Theorem named 'face_count_five' in the CubieTopologyCollapse family -- registry statement: Topology Collapse

Theorem face_count_five :
  countFaces noWho = 5.

theorem face_count_five : countFaces noWho = 5


DERIVED: Definition named 'face_pass' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition face_pass (f : CubieFace) : bool :=
Record CubieRequest := {
}.


DERIVED: Definition named 'GpuCornerPass' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition GpuCornerPass (r : CubieRequest) : bool :=
Definition DeploymentCornerPass (r : CubieRequest) : bool :=
Record EpochCache := {
}.

def GpuCornerPass (r : CubieRequest) : Bool


DERIVED: Definition named 'DeploymentCornerPass' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition DeploymentCornerPass (r : CubieRequest) : bool :=
Record EpochCache := {
}.

def DeploymentCornerPass (r : CubieRequest) : Bool


DERIVED: Definition named 'policy_fresh' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler


DERIVED: Definition named 'telemetry_fresh' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler


DERIVED: Definition named 'Admit' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

def Admit (r : CubieRequest) (e : EpochCache) : Bool


DERIVED: Theorem named 'face_localized_denial_identity' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem face_localized_denial_identity : forall r e,
Proof.

theorem face_localized_denial_identity (r : CubieRequest) (e : EpochCache) :
    face_pass r.identity = false -> Admit r e = false


DERIVED: Theorem named 'face_localized_denial_lineage' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem face_localized_denial_lineage : forall r e,
Proof.

theorem face_localized_denial_lineage (r : CubieRequest) (e : EpochCache) :
    face_pass r.lineage = false -> Admit r e = false


DERIVED: Theorem named 'face_localized_denial_runtime' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem face_localized_denial_runtime : forall r e,
Proof.

theorem face_localized_denial_runtime (r : CubieRequest) (e : EpochCache) :
    face_pass r.runtime = false -> Admit r e = false


DERIVED: Theorem named 'face_localized_denial_context' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem face_localized_denial_context : forall r e,
Proof.

theorem face_localized_denial_context (r : CubieRequest) (e : EpochCache) :
    face_pass r.context = false -> Admit r e = false


DERIVED: Theorem named 'face_localized_denial_policy' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem face_localized_denial_policy : forall r e,
Proof.

theorem face_localized_denial_policy (r : CubieRequest) (e : EpochCache) :
    face_pass r.policy = false -> Admit r e = false


DERIVED: Theorem named 'face_localized_denial_outcome' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem face_localized_denial_outcome : forall r e,
Proof.

theorem face_localized_denial_outcome (r : CubieRequest) (e : EpochCache) :
    face_pass r.outcome = false -> Admit r e = false


DERIVED: Theorem named 'admit_implies_identity_pass' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem admit_implies_identity_pass : forall r e,
Proof.

theorem admit_implies_identity_pass (r : CubieRequest) (e : EpochCache) :
    Admit r e = true -> face_pass r.identity = true


DERIVED: Theorem named 'admit_implies_lineage_pass' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem admit_implies_lineage_pass : forall r e,
Proof.

theorem admit_implies_lineage_pass (r : CubieRequest) (e : EpochCache) :
    Admit r e = true -> face_pass r.lineage = true


DERIVED: Theorem named 'admit_implies_runtime_pass' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem admit_implies_runtime_pass : forall r e,
Proof.

theorem admit_implies_runtime_pass (r : CubieRequest) (e : EpochCache) :
    Admit r e = true -> face_pass r.runtime = true


DERIVED: Theorem named 'admit_implies_context_pass' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem admit_implies_context_pass : forall r e,
Proof.

theorem admit_implies_context_pass (r : CubieRequest) (e : EpochCache) :
    Admit r e = true -> face_pass r.context = true


DERIVED: Theorem named 'admit_implies_policy_pass' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem admit_implies_policy_pass : forall r e,
Proof.

theorem admit_implies_policy_pass (r : CubieRequest) (e : EpochCache) :
    Admit r e = true -> face_pass r.policy = true


DERIVED: Theorem named 'admit_implies_outcome_pass' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem admit_implies_outcome_pass : forall r e,
Proof.

theorem admit_implies_outcome_pass (r : CubieRequest) (e : EpochCache) :
    Admit r e = true -> face_pass r.outcome = true


DERIVED: Definition named 'bool_to_failure' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition bool_to_failure (b : bool) : nat := if b then 0 else 1.


DERIVED: Definition named 'face_denial_count' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition face_denial_count (f : CubieFace) : nat :=
Definition request_denial_count (r : CubieRequest) : nat :=
Lemma sum_zero_iff : forall a b : nat, a + b = 0 <-> a = 0 /\ b = 0.

def face_denial_count (f : CubieFace) : Nat


DERIVED: Definition named 'request_denial_count' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition request_denial_count (r : CubieRequest) : nat :=
Lemma sum_zero_iff : forall a b : nat, a + b = 0 <-> a = 0 /\ b = 0.

def request_denial_count (r : CubieRequest) : Nat


DERIVED: Lemma named 'sum_zero_iff' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Lemma sum_zero_iff : forall a b : nat, a + b = 0 <-> a = 0 /\ b = 0.


DERIVED: Lemma named 'bool_to_failure_zero_iff' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Lemma bool_to_failure_zero_iff : forall b, bool_to_failure b = 0 <-> b = true.


DERIVED: Lemma named 'bool_to_failure_le_1' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Lemma bool_to_failure_le_1 : forall b, bool_to_failure b <= 1.


DERIVED: Lemma named 'face_denial_count_zero_iff' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Lemma face_denial_count_zero_iff : forall f,
Proof.

theorem face_denial_count_zero_iff (f : CubieFace) :
    face_denial_count f = 0 <-> face_pass f = true


DERIVED: Lemma named 'face_denial_count_le_9' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Lemma face_denial_count_le_9 : forall f, face_denial_count f <= 9.

theorem face_denial_count_le_9 (f : CubieFace) : face_denial_count f <= 9


DERIVED: Theorem named 'denial_count_zero_iff_request_clean' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem denial_count_zero_iff_request_clean : forall r,
Proof.

theorem denial_count_zero_iff_request_clean (r : CubieRequest) :
    request_denial_count r = 0 <->
      face_pass r.identity = true /\
      face_pass r.lineage = true /\
      face_pass r.runtime = true /\
      face_pass r.context = true /\
      face_pass r.policy = true /\
      face_pass r.outcome = true


DERIVED: Theorem named 'denial_count_bounded_54' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem denial_count_bounded_54 : forall r,
Proof.

theorem denial_count_bounded_54 (r : CubieRequest) :
    request_denial_count r <= 54


DERIVED: Theorem named 'admit_iff_clean_and_fresh' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem admit_iff_clean_and_fresh : forall r e,
Proof.

theorem admit_iff_clean_and_fresh (r : CubieRequest) (e : EpochCache) :
    Admit r e = (GpuCornerPass r && DeploymentCornerPass r && unified_causal_clock_valid e)


DERIVED: Definition named 'project_request' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition project_request (r : CubieRequest) : CubieRequestSurface :=
{| rs_identity := surface (identity r);
Definition wsurf_id : CubieFaceSurface := {| fs_n1 := 1; fs_n2 := 11; fs_n3 := 21; fs_n4 := 31; fs_n5 := 41 |}.

def project_request (r : CubieRequest) : List CubieFaceSurface


DERIVED: Definition named 'wsurf_id' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition wsurf_id : CubieFaceSurface := {| fs_n1 := 1; fs_n2 := 11; fs_n3 := 21; fs_n4 := 31; fs_n5 := 41 |}.


DERIVED: Definition named 'wsurf_li' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition wsurf_li : CubieFaceSurface := {| fs_n1 := 2; fs_n2 := 12; fs_n3 := 22; fs_n4 := 32; fs_n5 := 42 |}.


DERIVED: Definition named 'wsurf_rt' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition wsurf_rt : CubieFaceSurface := {| fs_n1 := 3; fs_n2 := 13; fs_n3 := 23; fs_n4 := 33; fs_n5 := 43 |}.


DERIVED: Definition named 'wsurf_ctx' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition wsurf_ctx : CubieFaceSurface := {| fs_n1 := 4; fs_n2 := 14; fs_n3 := 24; fs_n4 := 34; fs_n5 := 44 |}.


DERIVED: Definition named 'wsurf_pol' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition wsurf_pol : CubieFaceSurface := {| fs_n1 := 5; fs_n2 := 15; fs_n3 := 25; fs_n4 := 35; fs_n5 := 45 |}.


DERIVED: Definition named 'wsurf_out' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition wsurf_out : CubieFaceSurface := {| fs_n1 := 6; fs_n2 := 16; fs_n3 := 26; fs_n4 := 36; fs_n5 := 46 |}.


DERIVED: Definition named 'wface_pass_at' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition wface_pass_at (s : CubieFaceSurface) : CubieFace :=
{| surface := s;
Definition wface_fail_at (s : CubieFaceSurface) : CubieFace :=
{| surface := s;
Definition wreq_genuine : CubieRequest :=
{| identity := wface_pass_at wsurf_id;
Definition wreq_spoof : CubieRequest :=
{| identity := wface_fail_at wsurf_id;
Definition wepoch : EpochCache :=
{| policy_age := 0; policy_max_age := 100;
Theorem surface_spoofing_separation :
exists r_gen r_spoof,
Proof.

def wface_pass_at (s : CubieFaceSurface) : CubieFace


DERIVED: Definition named 'wface_fail_at' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition wface_fail_at (s : CubieFaceSurface) : CubieFace :=
{| surface := s;
Definition wreq_genuine : CubieRequest :=
{| identity := wface_pass_at wsurf_id;
Definition wreq_spoof : CubieRequest :=
{| identity := wface_fail_at wsurf_id;
Definition wepoch : EpochCache :=
{| policy_age := 0; policy_max_age := 100;
Theorem surface_spoofing_separation :
exists r_gen r_spoof,
Proof.

def wface_fail_at (s : CubieFaceSurface) : CubieFace


DERIVED: Definition named 'wreq_genuine' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition wreq_genuine : CubieRequest :=
{| identity := wface_pass_at wsurf_id;
Definition wreq_spoof : CubieRequest :=
{| identity := wface_fail_at wsurf_id;
Definition wepoch : EpochCache :=
{| policy_age := 0; policy_max_age := 100;
Theorem surface_spoofing_separation :
exists r_gen r_spoof,
Proof.


DERIVED: Definition named 'wreq_spoof' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition wreq_spoof : CubieRequest :=
{| identity := wface_fail_at wsurf_id;
Definition wepoch : EpochCache :=
{| policy_age := 0; policy_max_age := 100;
Theorem surface_spoofing_separation :
exists r_gen r_spoof,
Proof.


DERIVED: Definition named 'wepoch' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Definition wepoch : EpochCache :=
{| policy_age := 0; policy_max_age := 100;
Theorem surface_spoofing_separation :
exists r_gen r_spoof,
Proof.


DERIVED: Theorem named 'surface_spoofing_separation' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem surface_spoofing_separation :
exists r_gen r_spoof,
Proof.

theorem surface_spoofing_separation :
    ∃ r_gen r_spoof : CubieRequest,
      project_request r_gen = project_request r_spoof /\
      Admit r_gen wepoch = true /\
      Admit r_spoof wepoch = false


DERIVED: Theorem named 'admit_not_surface_determined' in the CubieTrustCompilerV1_50 family -- registry statement: V1.50 Trust Compiler

Theorem admit_not_surface_determined :
Proof.

theorem admit_not_surface_determined :
    ¬ (∀ r_gen r_spoof : CubieRequest,
      project_request r_gen = project_request r_spoof ->
      Admit r_gen wepoch = Admit r_spoof wepoch)


DERIVED: Definition named 'face_pass' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Definition face_pass (f : CubieFace) : bool :=
  c1 f && c2 f && c3 f && c4 f && c5 f &&
  c6 f && c7 f && c8 f && c9 f.


DERIVED: Definition named 'GpuCornerPass' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Definition GpuCornerPass (r : CubieRequest) : bool :=
  face_pass (runtime r) && face_pass (context r) && face_pass (outcome r).

def GpuCornerPass (r : CubieRequest) : Bool


DERIVED: Definition named 'DeploymentCornerPass' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Definition DeploymentCornerPass (r : CubieRequest) : bool :=
  face_pass (identity r) && face_pass (lineage r) && face_pass (policy r).

def DeploymentCornerPass (r : CubieRequest) : Bool


DERIVED: Definition named 'policy_fresh' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler


DERIVED: Definition named 'telemetry_fresh' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler


DERIVED: Definition named 'Admit' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Definition Admit (r : CubieRequest) (e : EpochCache) : bool :=
  structural_identity_valid r && unified_causal_clock_valid e &&
  GpuCornerPass r && DeploymentCornerPass r.

def Admit (r : CubieRequest) (e : EpochCache) : Bool


DERIVED: Theorem named 'face_localized_denial_identity' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem face_localized_denial_identity : forall r e,
  face_pass (identity r) = false -> Admit r e = false.

theorem face_localized_denial_identity (r : CubieRequest) (e : EpochCache) :
    face_pass r.identity = false -> Admit r e = false


DERIVED: Theorem named 'face_localized_denial_lineage' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem face_localized_denial_lineage : forall r e,
  face_pass (lineage r) = false -> Admit r e = false.

theorem face_localized_denial_lineage (r : CubieRequest) (e : EpochCache) :
    face_pass r.lineage = false -> Admit r e = false


DERIVED: Theorem named 'face_localized_denial_runtime' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem face_localized_denial_runtime : forall r e,
  face_pass (runtime r) = false -> Admit r e = false.

theorem face_localized_denial_runtime (r : CubieRequest) (e : EpochCache) :
    face_pass r.runtime = false -> Admit r e = false


DERIVED: Theorem named 'face_localized_denial_context' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem face_localized_denial_context : forall r e,
  face_pass (context r) = false -> Admit r e = false.

theorem face_localized_denial_context (r : CubieRequest) (e : EpochCache) :
    face_pass r.context = false -> Admit r e = false


DERIVED: Theorem named 'face_localized_denial_policy' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem face_localized_denial_policy : forall r e,
  face_pass (policy r) = false -> Admit r e = false.

theorem face_localized_denial_policy (r : CubieRequest) (e : EpochCache) :
    face_pass r.policy = false -> Admit r e = false


DERIVED: Theorem named 'face_localized_denial_outcome' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem face_localized_denial_outcome : forall r e,
  face_pass (outcome r) = false -> Admit r e = false.

theorem face_localized_denial_outcome (r : CubieRequest) (e : EpochCache) :
    face_pass r.outcome = false -> Admit r e = false


DERIVED: Theorem named 'admit_implies_identity_pass' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem admit_implies_identity_pass : forall r e,
  Admit r e = true -> face_pass (identity r) = true.

theorem admit_implies_identity_pass (r : CubieRequest) (e : EpochCache) :
    Admit r e = true -> face_pass r.identity = true


DERIVED: Theorem named 'admit_implies_lineage_pass' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem admit_implies_lineage_pass : forall r e,
  Admit r e = true -> face_pass (lineage r) = true.

theorem admit_implies_lineage_pass (r : CubieRequest) (e : EpochCache) :
    Admit r e = true -> face_pass r.lineage = true


DERIVED: Theorem named 'admit_implies_runtime_pass' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem admit_implies_runtime_pass : forall r e,
  Admit r e = true -> face_pass (runtime r) = true.

theorem admit_implies_runtime_pass (r : CubieRequest) (e : EpochCache) :
    Admit r e = true -> face_pass r.runtime = true


DERIVED: Theorem named 'admit_implies_context_pass' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem admit_implies_context_pass : forall r e,
  Admit r e = true -> face_pass (context r) = true.

theorem admit_implies_context_pass (r : CubieRequest) (e : EpochCache) :
    Admit r e = true -> face_pass r.context = true


DERIVED: Theorem named 'admit_implies_policy_pass' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem admit_implies_policy_pass : forall r e,
  Admit r e = true -> face_pass (policy r) = true.

theorem admit_implies_policy_pass (r : CubieRequest) (e : EpochCache) :
    Admit r e = true -> face_pass r.policy = true


DERIVED: Theorem named 'admit_implies_outcome_pass' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem admit_implies_outcome_pass : forall r e,
  Admit r e = true -> face_pass (outcome r) = true.

theorem admit_implies_outcome_pass (r : CubieRequest) (e : EpochCache) :
    Admit r e = true -> face_pass r.outcome = true


DERIVED: Definition named 'bool_to_failure' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Definition bool_to_failure (b : bool) : nat := if b then 0 else 1.


DERIVED: Definition named 'face_denial_count' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Definition face_denial_count (f : CubieFace) : nat :=
  bool_to_failure (c1 f) + bool_to_failure (c2 f) +
  bool_to_failure (c3 f) + bool_to_failure (c4 f) +
  bool_to_failure (c5 f) + bool_to_failure (c6 f) +
  bool_to_failure (c7 f) + bool_to_failure (c8 f) +
  bool_to_failure (c9 f).

def face_denial_count (f : CubieFace) : Nat


DERIVED: Definition named 'request_denial_count' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Definition request_denial_count (r : CubieRequest) : nat :=
  face_denial_count (identity r) + face_denial_count (lineage r) +
  face_denial_count (runtime r) + face_denial_count (context r) +
  face_denial_count (policy r) + face_denial_count (outcome r).

def request_denial_count (r : CubieRequest) : Nat


DERIVED: Lemma named 'sum_zero_iff' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler


DERIVED: Lemma named 'bool_to_failure_zero_iff' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Lemma bool_to_failure_zero_iff : forall b,
  bool_to_failure b = 0 <-> b = true.


DERIVED: Lemma named 'bool_to_failure_le_1' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Lemma bool_to_failure_le_1 : forall b, bool_to_failure b <= 1.


DERIVED: Lemma named 'face_denial_count_zero_iff' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Lemma face_denial_count_zero_iff : forall f,
  face_denial_count f = 0 <-> face_pass f = true.

theorem face_denial_count_zero_iff (f : CubieFace) :
    face_denial_count f = 0 <-> face_pass f = true


DERIVED: Lemma named 'face_denial_count_le_9' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Lemma face_denial_count_le_9 : forall f, face_denial_count f <= 9.

theorem face_denial_count_le_9 (f : CubieFace) :
    face_denial_count f <= 9


DERIVED: Theorem named 'denial_count_zero_iff_request_clean' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem denial_count_zero_iff_request_clean : forall r,
  request_denial_count r = 0 <->
    face_pass (identity r) = true /\
    face_pass (lineage r) = true /\
    face_pass (runtime r) = true /\
    face_pass (context r) = true /\
    face_pass (policy r) = true /\
    face_pass (outcome r) = true.

theorem denial_count_zero_iff_request_clean (r : CubieRequest) :
    request_denial_count r = 0 <->
      face_pass r.identity = true /\
      face_pass r.lineage = true /\
      face_pass r.runtime = true /\
      face_pass r.context = true /\
      face_pass r.policy = true /\
      face_pass r.outcome = true


DERIVED: Theorem named 'denial_count_bounded_54' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem denial_count_bounded_54 : forall r,
  request_denial_count r <= 54.

theorem denial_count_bounded_54 (r : CubieRequest) :
    request_denial_count r <= 54


DERIVED: Theorem named 'admit_iff_clean_and_fresh' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Theorem admit_iff_clean_and_fresh : forall r e,
  Admit r e =
    (structural_identity_valid r && unified_causal_clock_valid e &&
     GpuCornerPass r && DeploymentCornerPass r).

theorem admit_iff_clean_and_fresh (r : CubieRequest) (e : EpochCache) :
    Admit r e =
      (r.structural_identity_valid && unified_causal_clock_valid e &&
       GpuCornerPass r && DeploymentCornerPass r)


DERIVED: Definition named 'project_request' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Definition project_request (r : CubieRequest) : CubieRequestSurface :=
  {| rs_identity := surface (identity r);
     rs_lineage := surface (lineage r);
     rs_runtime := surface (runtime r);
     rs_context := surface (context r);
     rs_policy := surface (policy r);
     rs_outcome := surface (outcome r) |}.

def project_request (r : CubieRequest) : CubieRequestSurface


DERIVED: Definition named 'wsurf_id' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler


DERIVED: Definition named 'wsurf_li' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler


DERIVED: Definition named 'wsurf_rt' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler


DERIVED: Definition named 'wsurf_ctx' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler


DERIVED: Definition named 'wsurf_pol' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler


DERIVED: Definition named 'wsurf_out' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler


DERIVED: Definition named 'wface_pass_at' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler


DERIVED: Definition named 'wface_fail_at' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler


DERIVED: Definition named 'wreq_genuine' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Definition wreq_genuine : CubieRequest :=
  {| identity := face_all true; lineage := face_all true;
     runtime := face_all true; context := face_all true;
     policy := face_all true; outcome := face_all true;
     structural_identity_valid := true |}.


DERIVED: Definition named 'wreq_spoof' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Definition wreq_spoof : CubieRequest :=
  {| identity := face_all false; lineage := face_all true;
     runtime := face_all true; context := face_all true;
     policy := face_all true; outcome := face_all true;
     structural_identity_valid := false |}.


DERIVED: Definition named 'wepoch' in the CubieTrustCompilerV2_0 family -- registry statement: V2.0 Trust Compiler

Definition wepoch : EpochCache := {| causal_clock_valid := true |}.