Skip to content

[Lean Squad] feat(fv): Task 6 — Lean–C# correspondence review for primary targets - #7860

Merged
Evangelink merged 1 commit into
mainfrom
lean-squad/task6-correspondence-2026-04-26-a8bd16435dd5deb9
Apr 27, 2026
Merged

[Lean Squad] feat(fv): Task 6 — Lean–C# correspondence review for primary targets#7860
Evangelink merged 1 commit into
mainfrom
lean-squad/task6-correspondence-2026-04-26-a8bd16435dd5deb9

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Document how each Lean 4 model maps to the C# source for the three primary FV targets:

  • ArgumentArity: structure mapping, Int approximation, Int32.MaxValue sentinel, DecidableEq, excluded GetHashCode/object.Equals, theorem correspondence table
  • CommandLineParser.TryUnescape: signature simplification (IEnvironment→newLine, option dropped, out params→Except), sequential Replace order, bug edge cases treated as unreachable in spec
  • TreeNodeFilter.MatchFilterPattern: FilterExpression hierarchy → inductive type, Regex abstracted to String→Bool, PropertyBag abstracted, Boolean-algebra theorems

Also document general C#→Lean conventions for the project.

🔬 Lean Squad — automated FV correspondence review.

Fixes #7851

…ryUnescape, and TreeNodeFilter

Document how each Lean 4 model maps to the C# source for the three primary
FV targets:

- ArgumentArity: structure mapping, Int approximation, Int32.MaxValue sentinel,
  DecidableEq, excluded GetHashCode/object.Equals, theorem correspondence table
- CommandLineParser.TryUnescape: signature simplification (IEnvironment→newLine,
  option dropped, out params→Except), sequential Replace order, bug edge cases
  treated as unreachable in spec
- TreeNodeFilter.MatchFilterPattern: FilterExpression hierarchy → inductive type,
  Regex abstracted to String→Bool, PropertyBag abstracted, Boolean-algebra theorems

Also document general C#→Lean conventions for the project.

🔬 Lean Squad — automated FV correspondence review.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 27, 2026 08:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds detailed Lean 4 ↔ C# correspondence documentation for the three primary formal-verification targets (ArgumentArity, CommandLineParser.TryUnescape, TreeNodeFilter.MatchFilterPattern), plus a set of general modelling conventions to standardize future specs.

Changes:

  • Documented C#→Lean construct mappings, deliberate approximations, exclusions, and open questions for ArgumentArity.
  • Documented a simplified Lean-facing spec signature and behavioural notes for CommandLineParser.TryUnescape, including the sequential escape replacement model.
  • Outlined a planned inductive Lean model for TreeNodeFilter.MatchFilterPattern and enumerated intended Boolean-algebra theorems.
Show a summary per file
File Description
formal-verification/CORRESPONDENCE.md Adds correspondence mappings and modelling conventions for the three primary FV targets.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread formal-verification/CORRESPONDENCE.md
Comment thread formal-verification/CORRESPONDENCE.md
@Evangelink
Evangelink merged commit 31a545e into main Apr 27, 2026
28 checks passed
@Evangelink
Evangelink deleted the lean-squad/task6-correspondence-2026-04-26-a8bd16435dd5deb9 branch April 27, 2026 11:16
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.

[Lean Squad] feat(fv): Task 6 — Lean–C# correspondence review for primary targets

3 participants