Skip to content

Basic Theory of Sets#3777

Draft
WolframPfeifer wants to merge 2 commits intomainfrom
pfeifer/3690sets
Draft

Basic Theory of Sets#3777
WolframPfeifer wants to merge 2 commits intomainfrom
pfeifer/3690sets

Conversation

@WolframPfeifer
Copy link
Member

This PR adds a basic theory of (polymorphic) sets with cardinality to KeY. The rules are taken from the LocSet rules with the obvious adaptations (removal of Object/Field in favor of the generic sort T). However, I tried to keep the rule base minimal (20 rules at the moment), the rules are selected pragmatically (what was needed for a recent example) without any further thoughts about completeness.

In its current state, this PR partially solves #3690: At the moment, polymorphic sorts cannot be used in JML.
I don't really have an idea what the syntax should be on JML level, and think that we should discuss this before I try to implement anything.

Type of pull request

  • New feature (non-breaking change which adds functionality)
  • There are changes to the (Java) code
  • There are changes to the taclet rule base

Ensuring quality

  • I added new test case(s) for new functionality: Small (auto-)provable lemma added to RunAllProofs (setExample.key)

Additional information and contact(s)

The contributions within this pull request are licensed under GPLv2 (only) for inclusion in KeY.

@WolframPfeifer WolframPfeifer added this to the v3.0.0 milestone Mar 18, 2026
@WolframPfeifer WolframPfeifer self-assigned this Mar 18, 2026
@WolframPfeifer WolframPfeifer added Feature New feature or request Calculus RFC "Request for comments" is the appeal for making and expressing your opinion on a topic. labels Mar 18, 2026
@wadoon
Copy link
Member

wadoon commented Mar 18, 2026

Is it possible to define type alias? typealias locset = Set<[Tuple<[any,field]>]>?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Calculus Feature New feature or request RFC "Request for comments" is the appeal for making and expressing your opinion on a topic.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants