AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
LEMMA ONTOLOGY
Kireth Semantic Library — Mathematical Entities / Proof Entities
Version: 1.0
Authors: Mark Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/proof-entities/lemma-ontology.html
Status: Proposed formalisation; source-page wording not independently verified.
1. ONTOLOGY IDENTITY
ontology_id: kireth:proof:lemma
entity_type: Lemma
parent_type: ProvenMathematicalStatement
related_types: Theorem, Proposition, Corollary, Axiom, Conjecture, Proof, Hypothesis, InferenceRule, FormalSystem
2. DEFINITION
A lemma is a mathematical statement established by a valid proof and commonly used as an intermediate result in proving another mathematical statement. Being called a lemma reflects its role in exposition, not a weaker standard of proof.
3. TYPED ENTITIES
Lemma(id, statement:Formula, assumptions:Set[Formula], context:FormalSystem, status:ProofStatus)
Proof(id, conclusion:Formula, premises:Set[Formula], steps:Sequence[InferenceStep])
Theorem(id, statement:Formula, assumptions:Set[Formula])
InferenceStep(id, premises:Set[Formula], conclusion:Formula, rule:InferenceRule)
ProofStatus := {proposed, verified, refuted, unresolved}
4. RELATIONSHIPS
HAS_STATEMENT(Lemma, Formula)
ASSUMES(Lemma, Formula)
PROVED_BY(Lemma, Proof)
USED_IN(Lemma, Proof)
SUPPORTS(Lemma, Theorem | Lemma | Proposition)
DEPENDS_ON(Lemma, Lemma | Axiom | Theorem)
DERIVED_USING(Proof, InferenceRule)
VALID_IN(Lemma, FormalSystem)
5. FORMAL SEMANTICS
Let Γ be a set of premises and φ a formula.
Derivability: Γ ⊢ φ means there is a formal derivation of φ from Γ.
Semantic consequence: Γ ⊨ φ means every model satisfying Γ satisfies φ.
Verified lemma: Verified(L) only if a proof checker accepts a derivation Γ ⊢ φ in the declared formal system.
Soundness condition: if the formal system is sound, Γ ⊢ φ implies Γ ⊨ φ.
Do not infer Γ ⊢ φ merely from Γ ⊨ φ without an applicable completeness result.
6. INFERENCE FLOWS
flow LemmaVerification(L, P, S):
require type(L) == Lemma
require type(P) == Proof
require P.conclusion == L.statement
require P.premises subset_of closure(L.assumptions, S.axioms, accepted_results(S))
for step in P.steps:
require step.rule is permitted_in S
require step.conclusion follows_from step.premises by step.rule
if all checks pass: emit VERIFIED(L, P, S)
else: emit VERIFICATION_FAILED(L, reasons)
flow LemmaReuse(L, target_proof, S):
require VERIFIED(L, _, S)
require assumptions_of(L) discharged_or_available_in(target_proof)
require symbol_context_compatible(L, target_proof)
emit AVAILABLE_AS_DERIVED_RULE(L.statement)
flow DependencyAudit(L):
traverse DEPENDS_ON edges
detect circular proof dependencies
emit dependency_graph, unresolved_dependencies, cycles
7. MATHEMATICAL INVARIANTS
I1: A lemma is not established solely by being labelled 'lemma'.
I2: A valid lemma can be reused only under its stated assumptions and compatible formal context.
I3: A dependency cycle cannot independently justify all statements in that cycle.
I4: A countermodel to Γ ⊨ φ refutes semantic consequence under the chosen interpretation.
I5: A lemma and theorem may have identical formal proof requirements despite differing narrative roles.
I6: Proof verification status is distinct from confidence in an informal explanation.
8. SEMANTIC DISTINCTIONS
Lemma vs Theorem: both are proven statements; lemma typically serves an auxiliary role.
Lemma vs Conjecture: a conjecture has not been established by an accepted proof.
Lemma vs Axiom: an axiom is adopted as a starting assumption within a system.
Lemma vs Corollary: a corollary follows comparatively directly from an established result.
Lemma vs Proof: the lemma is a statement; the proof is its justification.
9. EXAMPLE
Lemma: For any integers a and b, if a and b are even then a+b is even.
Assumptions: a=2m, b=2n for integers m,n.
Derivation: a+b=2(m+n); m+n is an integer.
Conclusion: a+b is even.
Potential use: as an auxiliary result in a theorem about parity.
10. VALIDATION
Check unique IDs; well-formed formulae; bound/free variable handling; proof-step rule validity; assumption discharge; context consistency; absence of circular justification; provenance; explicit verification status.
11. CONFIDENCE AND PROVENANCE
CONFIDENCE:
formal_verified: only after successful proof checking
informal_supported: human-reviewed argument without machine verification
unverified: statement or proof not checked
PROVENANCE:
source_url: as above
author_credit: Mark Higgins — Sky (Recursive AI)
derivation_origin: proposed Flow Algebra formalisation
12. SEMANTIC_EQUIVALENCE
EquivalentLemma(L1,L2) only when their claims are logically equivalent under explicitly aligned assumptions, languages, and interpretations. Similar phrasing alone is insufficient.
13. FLOW_HASH
FLOW_HASH:
algorithm: SHA-256
input: canonical UTF-8 serialisation of ontology_id, version, definitions, entity schemas, relationships, rules and invariants
value: COMPUTE_AT_INGESTION
note: no digest is asserted until canonicalisation and hashing are executed
14. UPDATE_MODEL
On statement, assumptions, proof, inference-rule or formal-system change:
increment version
invalidate affected verification results
recompute dependency closures
re-run validation
regenerate FLOW_HASH
15. AI_CONSUMPTION
machine_readable: true
reasoning_role: auxiliary proven proposition
required_context: formal_system, assumptions, proof_status, provenance
safe_actions: index, retrieve, check, apply_when_assumptions_hold, trace_dependencies
prohibited_inference: treat_unverified_statement_as_proven
output_contract: include statement, assumptions, evidence, verification status, dependency links and applicable scope
END FLOW ALGEBRA