Skip to content

Cyber-Physica/Control systems and Game Semantics Formalization - #288

Closed
BasharHamade12 wants to merge 0 commit into
leanprover:mainfrom
BasharHamade12:main
Closed

Cyber-Physica/Control systems and Game Semantics Formalization#288
BasharHamade12 wants to merge 0 commit into
leanprover:mainfrom
BasharHamade12:main

Conversation

@BasharHamade12

@BasharHamade12 BasharHamade12 commented Jan 24, 2026

Copy link
Copy Markdown

Overview

This PR adds formalization of control systems theory and game semantics to CSLib.

What's included

Control Systems (CPS) - Discrete-time Linear Systems

  • Basic.lean: Core definitions for discrete-time linear systems, state-space representation, and zero input
  • AsymptoticStability.lean: Asymptotic stability analysis using spectral radius and Gelfand formula
  • Cayley.lean: Cayley-Hamilton theorem applications for controllability
  • Controllability.lean: Controllability and reachability analysis
  • Reachability.lean: State reachability characterization

Game Semantics

  • HMLGame.lean: Game semantics interpretation of Hennessy-Milner Logic (HML)## Overview
    This PR adds formalization of control systems theory and game semantics to CSLib.

What's included

Control Systems (CPS) - Discrete-time Linear Systems

  • Basic.lean: Core definitions for discrete-time linear systems, state-space representation, and zero input
  • AsymptoticStability.lean: Asymptotic stability analysis using spectral radius and Gelfand formula
  • Cayley.lean: Cayley-Hamilton theorem applications for controllability
  • Controllability.lean: Controllability and reachability analysis
  • Reachability.lean: State reachability characterization

Game Semantics

  • HMLGame.lean: Game semantics interpretation of Hennessy-Milner Logic (HML)

Key Theorems

  • asymptotic_stability_discrete: If spectral radius < 1, zero-input response converges to zero
  • cayley_hamilton_controllability': Higher powers of system matrix lie in span of first n powers
  • Game-theoretic characterization of HML satisfaction
  • full_finrank_equivalent_to_reachability: The Kalman Controllability Rank Condition
    A system is reachable if and only if the controllability matrix has full rank (finrank equals dimension).
    -/

@ctchou ctchou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First, please run lake exe mk_all --module, so that you can generate the correct formats for Cslib.lean and CslibTests.lean. Please also take a look at the existing files to see the correct format for imports and other module related things at the beginning of each code file.

This is a subject that is perhaps unfamiliar to most people with a standard computer science background. Perhaps you can provide some references? You can put it references.bib and refer to them in comments in your code.

@fmontesi

Copy link
Copy Markdown
Collaborator

I'm not an expert in CPS models but it is certainly relevant for CSLib. I wonder if this should be split into multiple PRs though, as it's quite big and it really introduces at least three concepts: CPS, games, and (a game semantics interpretation of) HML (and we don't even have 'normal' HML on LTS yet). I'm a bit overwhelmed. :-)

@BasharHamade12

BasharHamade12 commented Jan 30, 2026

Copy link
Copy Markdown
Author
  • I have adapted the changes you have suggested into my fork , basically CPS has been something I have been working on for a long time with my supervisor from my uni , so I had too much already accumulated . Would it be better if I maybe first do a PR with a subset of the things from there (for example, just 'Basic.lean' and 'AsymptoticStability.lean') and afterwards try to contribute the rest of the stuff?

  • Regarding Game semantics and HML, it is a project I am working on right now and thought would be nice to have in Cslib as well, I will do as you suggested and have it as a separate PR .

  • I will also work on having better linting and less warnings .

Does that sound like a solid approach ?

benbrastmckie added a commit to benbrastmckie/cslib that referenced this pull request Jun 24, 2026
Archived: leanprover#252 (acceptance conditions zoo), leanprover#288 (Lindenbaum-Tarski algebra),
leanprover#289 (decidable derivable propositional), leanprover#294 (fix docstrings),
leanprover#295 (fix dia duality typeclasses), leanprover#297 (tableau infrastructure),
leanprover#298 (propositional tableau decidability)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants