Download alloy/modules/State.als from Snapkitty/hcalc: direct link, hf CLI and curl.
- Browser
- Download file 2.21 kB
-
https://huggingface.co/Snapkitty/hcalc/resolve/main/alloy/modules/State.als
- Command line
-
hf download hf://Snapkitty/hcalc/alloy/modules/State.als
-
curl -L -o State.als https://huggingface.co/Snapkitty/hcalc/resolve/main/alloy/modules/State.als
2.21 kB
| /* | |
| * Copyright (C) 2026 HCALC / Foundry J contributors | |
| * SPDX-License-Identifier: AGPL-3.0-only | |
| * | |
| * Module: State β production Carrier Fin n β β with ββ (abstract). | |
| * Cite: PRODUCTION.md Β§1 Gap-Carrier CLOSED; FOUNDRY_J_CROSSLINKS Β§0βΒ§2. | |
| * Provenance: SpecDefined | |
| */ | |
| module modules/State | |
| /* Discrete evolution carrier (abstract atoms; dim/norm in CarrierSpec). */ | |
| sig State {} | |
| /* Finite time atoms for bounded evolution. */ | |
| sig Time { | |
| next: lone Time, | |
| at: one State | |
| } | |
| /* Total order spine on Time: linear chain, unique start. | |
| * Provenance: derived β finite-scope safety for evolution. */ | |
| fact INV_time_linear_chain { | |
| one t: Time | no t.~next | |
| all t: Time | lone t.next | |
| all disj t1, t2: Time | t1 in t2.^next or t2 in t1.^next | |
| } | |
| /* Evolution totality: every State is witnessed at some Time. */ | |
| fact fact_evolution_total_on_State { | |
| all s: State | some t: Time | t.at = s | |
| } | |
| pred evolution_total_on_State { | |
| all s: State | some t: Time | t.at = s | |
| } | |
| assert INV_evolution_total_on_State { | |
| evolution_total_on_State | |
| } | |
| /* Instance tag: Foundry vs HCALC-native step shape (do not equate silently). */ | |
| abstract sig InstanceKind {} | |
| one sig FoundryInstance, HCALCInstance extends InstanceKind {} | |
| one sig ActiveInstance { | |
| kind: one InstanceKind | |
| } | |
| /* ---- Production Carrier: abstract dim nβ₯1, ββ ---- | |
| * Provenance: SpecDefined β PRODUCTION.md Β§1. | |
| * Numeric β^n lives in Lean; Alloy encodes dimβ₯1 + LInf flags (no heavy Int arith). */ | |
| abstract sig NormKind {} | |
| one sig LInf extends NormKind {} | |
| one sig CarrierSpec { | |
| /* dimPositive=1 encodes nβ₯1 (avoid bitblast of concrete n). */ | |
| dimPositive: Int, | |
| norm: one NormKind | |
| } | |
| fact fact_P1_carrier_production { | |
| CarrierSpec.dimPositive = 1 | |
| CarrierSpec.norm = LInf | |
| } | |
| pred carrier_linf_dim_ok { | |
| CarrierSpec.dimPositive = 1 | |
| CarrierSpec.norm = LInf | |
| } | |
| assert P1_carrier_linf_dim { | |
| /* Production assert P1 β Carrier abstract dim nβ₯1, ββ */ | |
| carrier_linf_dim_ok | |
| } | |
| /* Measure atom β no Int payload (Int bitblast hangs checks). */ | |
| sig Measure {} | |
| sig StateMeasure { | |
| of: one State, | |
| m: one Measure | |
| } | |
| fact INV_state_measure_functional { | |
| all s: State | lone sm: StateMeasure | sm.of = s | |
| } | |