FormaSL — Semantic Invariants
Status: STABLE
Authority: NORMATIVE SEMANTIC CONTRACT
Parent: FORMAL-WORLD-MODEL.md
Role: define semantic distinctions that any conforming FormaSL design, architecture, formalization and implementation must preserve.
1. Purpose
An invariant states a semantic distinction that MUST remain recoverable whenever it is relevant to a valid FormaSL computation.
An invariant does not prescribe one storage model, AST shape, graph schema, proof representation, runtime or family decomposition.
Shared representation is permitted; semantic erasure is not.
Two semantically distinct roles may share a physical carrier if later computation can still recover the distinction required by the contract.
2. Normative vocabulary
- MUST — required for semantic conformance.
- MUST NOT — forbidden semantic collapse or behavior.
- SHOULD — strong design expectation whose violation requires explicit justification.
- MAY — permitted realization choice.
- Recoverable — enough information survives to reconstruct the relevant semantic distinction without an unmodeled oracle.
3. Core invariants
INV-CORE-01 — Semantic type/kind preservation
A semantic transformation MUST preserve the semantic category/kind of referenced information unless the program explicitly performs a category-changing operation.
A Claim must remain recognizable as a Claim; provenance must not silently become an untyped generic association.
INV-CORE-02 — No hidden semantic oracle
A conforming implementation MUST NOT depend on an implicit mechanism that supplies truth, actuality, authority, relevance, compatibility, conflict resolution or another semantic judgment absent from the language or a declared runtime contract.
External systems MAY provide such judgments through explicit inputs/effects whose guarantee boundary is declared.
INV-CORE-03 — Logical graph semantics, physical representation freedom
FormaSL’s logical semantic model is graph/metagraph-native. No invariant requires a particular physical representation unless a later design authority explicitly narrows that freedom.
A substrate MAY use relational, key/value, native graph, tensor or hybrid encodings only if it preserves the graph/metagraph semantic contract.
INV-CORE-04 — Computation neutrality
Ordinary computation MAY be delegated to generic computational mechanisms. FormaSL-specific semantics arise from the meaning and distinctions that must survive, not from a requirement to invent one universal compute engine.
INV-CORE-05 — Explicit semantic coercion
A semantic category MUST NOT be silently coerced into another merely because their runtime representations are structurally compatible.
A category-changing transformation must be explicit in the FormaSL semantic contract.
INV-CORE-06 — Graph membership is not truth or assertion
GraphMembership != Truth
GraphMembership != Assertion
Representation != Actuality
Representing content in the semantic graph MUST NOT by itself assign assertive stance, truth or actuality.
4. Claim, assertion and epistemic invariants
INV-CLAIM-01 — Claim does not establish truth
Claim(a, p) != Truth(p)
The existence or issuance of a Claim MUST NOT by itself establish truth of its content.
INV-CLAIM-02 — Claim is not assessment
Claim != Assessment
An assessment MUST NOT mutate the historical identity of the assessed Claim into the assessment. Different assessments MAY coexist.
INV-CLAIM-03 — Claim-token identity is not content or lifecycle equality
Distinct attributable assertion tokens MUST remain distinguishable when their distinct history is semantically relevant, even when issuer, interpreted content and other qualifications are equivalent.
Conversely, representation, communication, receipt, recording, use or retransmission of the same Claim MUST NOT by itself create a new Claim identity.
ClaimIdentity != ContentEquality
ClaimIdentity != RepresentationOccurrence
ClaimIdentity != CommunicationOccurrence
INV-DERIVED-01 — Computation does not imply assertion
Producing, deriving, projecting, aggregating, validating, querying or otherwise computing semantic information MUST NOT by itself create a Claim or assign an issuer.
Computation != Assertion
DerivedSemanticResult != Claim by default
Producer != Issuer
SemanticConsequence != Claim
A Claim based on a computed result requires an attributable assertion under the applicable semantic contract.
INV-EPISTEMIC-01 — Epistemic absence states do not silently collapse
Where represented, the following meanings MUST remain distinguishable:
False
Unknown
Unobserved
Hidden
Nonexistent
NotApplicable
A common tagged carrier is permitted; one undifferentiated null/false/absent value is not when meaning is lost.
5. Communication and agency invariants
INV-COMM-01 — Communication lifecycle separation
When distinguished by the program, these roles MUST remain independently representable:
Issue / Assert
Transmit
Receive
Accept
Use
Retransmit
At minimum:
Receive != Accept
Accept != Use
Use != Retransmit
Retransmit != Reassert
No implicit lifecycle advancement is allowed unless an explicit FormaSL construct defines it.
INV-AGENCY-01 — Executor is not authority
The entity that performs a computation or action MUST NOT automatically be treated as the authority, power holder or normative source for it.
Executor != Authority
Producer != Issuer
INV-AGENCY-02 — Capability, permission, obligation and occurrence remain distinct
Capability != Permission
Permission != Obligation
Obligation != Occurrence
Capability != Occurrence
Observed execution MUST NOT by itself establish permission or obligation.
INV-AUTHORITY-01 — Authority dimensions do not collapse
SituatedSemanticAuthority
!= SourceRecordAuthority
!= LanguageFormationAuthority
!= OperationalWritePermission
A process MAY have permission to write storage or source artifacts without acquiring semantic authority to issue Claims. Source inclusion MAY establish corpus membership without establishing truth or issuer competence.
6. Visibility, scope and frame invariants
INV-VIS-01 — Visibility is not existence
NotVisible != Nonexistent
Absence from an observer’s view MUST NOT by itself imply nonexistence.
INV-SCOPE-01 — Applicability is not existence
A semantic item MAY exist while being outside the scope/frame of an operation. Filtering by scope MUST NOT silently rewrite existence semantics.
INV-SCOPE-02 — Frame compatibility is not transformation
Compatible(f1, f2) != Transform(f1, f2)
A compatibility judgment MUST NOT silently perform a frame transformation.
7. Conflict and decision invariants
INV-CONFLICT-01 — Incompatible positions may coexist
The semantic model MUST permit incompatible Claims, assessments or observations to coexist without invalidating the world model.
INV-CONFLICT-02 — Conflict is non-generative
Conflict by itself MUST NOT authorize arbitrary unrelated conclusions.
INV-CONFLICT-03 — Reconciliation, revision and decision are explicit
If a computation resolves, selects, reconciles, revises or adjudicates conflict, that transition MUST be semantically explicit/recoverable.
Conflict MUST NOT silently disappear through query, aggregation, serialization, indexing or storage behavior.
8. Temporal and history invariants
INV-TIME-01 — Temporal roles remain distinct
When relevant, the following roles MUST remain recoverable even when values coincide:
validity time
observation time
knowledge time
decision time
recording / transaction time
INV-TIME-02 — Temporal precedence is not semantic dependence
Precedes(a, b) != Causes(a, b)
Precedes(a, b) != DerivesFrom(b, a)
Precedes(a, b) != ProvenanceOf(a, b)
Chronology alone MUST NOT create causal, derivational or provenance relations.
INV-TIME-03 — Revision does not erase prior occurrence
A later revision, retraction, replacement or promotion MUST NOT make an earlier semantic occurrence indistinguishable from “never occurred.”
This does not require event sourcing or append-only physical storage.
9. Dynamic-world and observation invariants
INV-DYN-01 — Dynamic roles remain distinguishable
Where modeled:
State != Event != Action != Process
INV-OCC-01 — Reference is not actuality
Representing or referring to a state, event, action, process or possible occurrence MUST NOT by itself establish that it actually holds or occurred.
ReferenceTo(o) != EstablishedOccurrence(o)
RepresentationOf(o) != TruthOfOccurrence(o)
Any computation relying on actuality must have an explicit epistemic/contractual basis.
INV-DYN-02 — Decision, execution, effect and observation remain distinct
Decision != Execution
ExecutionSuccess != ExternalEffectOccurred
Occurrence != Effect
Effect != Observation
Observation != Truth
A successful admission, decision or execution MUST NOT by itself establish that an intended external effect occurred.
An occurrence/effect MUST NOT by itself establish that it was observed.
10. Identity and higher-order invariants
INV-ID-01 — Identity is not identifier, name or representation
Identity != Identifier
Identity != Name
Identity != Representation
Identity != StorageKey
Changing serialization, local identifier, physical record or label MUST NOT automatically create a new semantic entity unless the language semantics explicitly says so.
INV-ID-02 — Higher-order reference preserves identity and semantic kind
When semantic information refers to other semantic information, the referenced item’s identity and semantic kind MUST remain recoverable when required by later operations.
INV-ID-03 — Structural equality is not universal semantic identity
Structurally equal relations, Claims or semantic objects MUST NOT be globally deduplicated solely because their field representations match when their distinct identity/history matters.
11. Provenance and reasoning invariants
INV-PROV-01 — Provenance, derivation, support, causation and lineage remain distinguishable
Where represented, these relations MUST NOT silently collapse into an undifferentiated related_to relation.
A common carrier MAY be used when relation kind remains explicit/recoverable.
INV-PROV-02 — Traceability is not public transparency
Traceable != Public
Reconstructibility MUST NOT imply that all supporting data is universally visible.
INV-PROV-03 — Material dependence remains reconstructible
When a computation produces a semantic result from other semantic information, dependencies necessary to interpret, explain or verify the result SHOULD remain reconstructible unless explicit semantics authorize their loss.
This includes material hypothetical dependence.
INV-REASON-01 — Derivation, proof, trace and explanation remain distinct
Derivation != ProofObject
Derivation != RuntimeTrace
Provenance != Explanation
Certificate != Truth
Operational evidence MAY support formal or semantic claims only under explicit contracts.
12. Normative and governance invariants
INV-NORM-01 — Normative status is not descriptive regularity
Permission, obligation, prohibition, authority or other normative status MUST NOT be inferred solely because behavior usually occurs or physically occurred.
INV-NORM-02 — Normative source remains attributable
When a normative judgment depends on a policy, authority or commitment, the relevant normative basis SHOULD remain reconstructible through computations that rely on it.
INV-GOV-01 — Validation, Conformance and Admission remain distinct
Validation != Conformance
Conformance != Admission
A target’s conformance to a declared validation contract MUST NOT by itself establish that the target is admitted across a governed boundary.
INV-GOV-02 — Admission, Authorization and occurrence remain distinct
Admission != Authorization
Authorization != Execution
Admission != BoundaryCrossing
Admission of a candidate MUST NOT by itself establish authorization of an actor. Authorization MUST NOT establish that execution or boundary crossing occurred.
A valid denial/non-conformance is also distinct from failure of the evaluation process.
INV-GOV-03 — Judgment is not committing decision
AdmissionJudgment != AdmissionDecision
AuthorizationEvaluation != AuthorizationDecision
Decision != DecisionProcessFailure
Eligibility/evaluation and a historical committing decision MAY occur separately.
13. Hypothetical-state invariants
INV-HYP-01 — Assumption is non-assertive and scoped
A hypothetical assumption MUST NOT by itself establish truth, create a Claim or mutate the baseline semantic context.
Assume(S, p) != Claim(p)
Assume(S, p) != Truth(p)
HypotheticalOccurrence != ActualOccurrence
INV-HYP-02 — No implicit hypothetical promotion
Semantic information that depends materially on hypothetical assumptions MUST NOT silently lose that dependence or acquire a non-hypothetical status.
Promotion from hypothetical evaluation into another semantic role must be explicit and attributable under the applicable contract.
Hypothetical != Unknown
Future != Hypothetical
Promotion != RetroactiveReclassification
14. Type-system invariants
INV-TYPE-01 — Specialization is not substitutability by default
Inheritance != Subtyping
A specialization/inheritance relationship MUST NOT by itself establish subtyping/substitutability unless the applicable type contract guarantees safe substitution.
INV-TYPE-02 — Substitutability preserves the target semantic contract
If S is accepted as a subtype/substitute of T, using an admissible S where T is required MUST preserve every semantic guarantee that the consumer of T is entitled to rely on.
Representation compatibility or structural similarity alone is insufficient.
Subtyping != TypeIdentity
StructuralSimilarity != Subtyping by default
INV-TYPE-03 — Compiler/type-contract judgment is not situated world classification
LANGUAGE / META-LEVEL FORMATION
!= SEMANTIC TYPE-CONTRACT JUDGMENT
!= SITUATED DOMAIN CLASSIFICATION
A Claim that InstanceOf(X,T) MUST NOT silently mutate compiler/type-contract judgments. A compiler judgment MUST NOT by itself establish world truth or situated membership.
INV-TYPE-04 — Typing is not governance
WellTyped != Conformant
WellTyped != Admissible
WellTyped != Authorized
Governance cannot repair language ill-formedness, and language typing cannot grant permission.
15. Source, realization and runtime invariants
INV-SOURCE-01 — Authoritative source membership is not truth
.fsl source membership establishes corpus/source authority, not truth or issuer competence.
INV-SOURCE-02 — Runtime output is not authoritative source update
RuntimeOutput != AuthoritativeSourceUpdate
StorageWrite != SemanticAuthority
An authoritative semantic evolution requires an explicit category-appropriate source-authoring/incorporation transition.
INV-REAL-01 — Realization does not redefine semantic contract
.fsl = semantic contract
.fsp = realization
A different .fsp MAY change cost, resource use, execution route or completion of a run but MUST NOT silently redefine the .fsl semantic contract.
INV-REAL-02 — Static weaving is realization resolution, not semantic rewrite
Static weaving MAY bind abstract requirements to realization providers. It MUST preserve the identifiable semantic contract it realizes.
INV-RUNTIME-01 — Runtime evaluation is not late language invention
Runtime MAY evaluate defined semantics against dynamic state, perform inference or dispatch according to already-defined contracts. It MUST NOT guess or repair unresolved source meaning.
16. Gas and bounded-execution invariants
INV-GAS-01 — Gas is execution budget, not semantic conclusion
Gas is an explicit deterministic budget of logical computational work.
OUT_OF_GAS != FIXPOINT
OUT_OF_GAS != FALSE
OUT_OF_GAS != EMPTY
OUT_OF_GAS != NO_PROOF
Changing gas MUST NOT by itself redefine the semantic operation.
INV-GAS-02 — Partiality remains visible when material
A result produced under budget exhaustion MUST NOT be silently consumed as a complete closure when downstream meaning depends on completeness.
INV-GAS-03 — Bounded macro-steps are not sufficient bounded work
A gas implementation that decrements only an outer loop while allowing one charged step to contain unbounded combinatorial work does not satisfy the full bounded-computation purpose.
The exact metering unit remains open.
17. Compositional conformance
A feature is semantically conformant only if every applicable invariant is preserved across its inputs, transformations and outputs.
For a pipeline:
x --F1--> y --F2--> z
runtime type correctness of F1 and F2 is insufficient if a required semantic distinction is silently lost at either boundary.
The preservation contract is specified by SEMANTIC-CONTINUITY.md.
18. Audit statuses
Reviews SHOULD classify invariant status as:
PASS
PARTIAL
FAIL
NOT-APPLICABLE
UNKNOWN
UNKNOWN MUST NOT be reported as PASS.
19. Prohibited shortcuts
Unless explicitly justified by a stronger FormaSL rule, the following are semantic defects:
- treating every Claim as fact/truth;
- treating graph membership as assertion/truth;
- deduplicating distinct Claim tokens solely by equal content;
- turning every computed result into a Claim;
- assigning result producer as issuer automatically;
- using one boolean/null for false, unknown and absent;
- using one timestamp when temporal role cannot be recovered;
- treating invisibility as nonexistence;
- dropping issuer, observer, authority or decision basis during transformation;
- turning provenance, derivation and causation into untyped edges;
- treating runtime success as proof of permission or external effect;
- treating a represented occurrence as an established occurrence;
- treating an observation as truth;
- updating history in place so earlier semantic occurrences become unrecoverable;
- allowing hypothetical assumptions/results to mutate the baseline silently;
- treating conformance as admission or admission as authorization;
- treating inheritance as subtyping without the safe-substitution contract;
- treating a storage write as source/semantic authority;
- allowing
.fspto rewrite.fslmeaning; - resolving conflict by last-write-wins without an explicit semantic decision.
20. What the invariants do not require
This contract does not by itself require:
- a specific metagraph representation such as V1 DTMG;
- metagraph physical storage;
- universal typed semantic artifacts;
- append-only persistence;
- event sourcing;
- a global live Claim store;
- one paraconsistent logic;
- one modal logic;
- one temporal calculus;
- one scope lattice;
- one uncertainty algebra;
- an
ASSERT,OCCUR,ENSUREor other named primitive; - a fixed number of operations/families;
- System F<:;
- proof-carrying execution;
- one gas metering formula.
Such mechanisms may still be valid downstream design choices.
21. Invariant admission rule
Admit a new invariant only when there is a concrete pair of semantically distinct worlds, histories, positions or outcomes that would otherwise become indistinguishable under a valid execution.
Ask:
What two semantically distinct cases collapse if this rule is removed?
If no convincing witness exists, keep the proposition as design guidance rather than silently promoting it to semantic necessity.
22. Change control
Changing an invariant requires analysis of:
- affected World Model commitments;
- affected semantic operations, constructs and transformation boundaries;
- affected continuity obligations;
- V1 capability/evidence consequences;
- affected macro-architecture boundaries;
- Agda obligations;
- implementation and conformance tests;
- stored/serialized artifacts where applicable.
Removing an invariant is a semantic compatibility event, not documentation cleanup.