Comments (1)
The feedback from the user interface might be a little surprising here. To understand what is going on, we have to look a little into the proof techniques of KeYmaera X.
For starters, here's a tutorial that introduces common modeling examples gradually. There's also an extensive set of lecture notes with details on the proof techniques.
The master tactic does an automated proof search, which may or may not succeed. When the master tactic stops with open proof goals (tabs), it means either
- There's a loop without
@invariant
annotation and master did not find a loop invariant on its own -> solution: provide a loop invariant (see below what an invariant annotation tells KeYmaera X, and Lecture Notes) - There's an unsolvable differential equation without
@invariant
annotation and master did not find the appropriate differential invariants on its own -> solution: provide a differential invariant (Diff. Inv. and Diff. Cuts) - The formula is wrong -> solution: click
Inspect->Counterexample
(only for real arithmetic formulas, i.e., not for formulas of the form[a]p
or<a>p
), which return values that make the assumptions left of the turnstile|-
true but the formulas right of the turnstile false. Or clickInspect->Find Assumptions
to get suggestions what KeYmaera X thinks is missing. But carefully scrutinize the suggestions: additional assumptions can result in a vacuous proof, e.g.,controlsig=50 & controlsig=4 -> whatever
and master will happily prove that for you.
Now let's look into your particular example. The program contains a loop, the annotation @invariant
tells the master tactic about a formula that it should try as a loop invariant in an induction proof. Such a proof has three cases:
- Base case: the invariant must be true in the beginning (in this particular example:
controlsig=50 & temp=18 & setpoint=23 -> temp>10
) - Use case: the invariant must be strong enough to show the safety property (here:
temp>10 -> temp>20
) - Induction step: the invariant must stay true through one run of the loop body (here:
temp>10 -> [program]temp>10
)
Your tactic ending in <(nil, nil)
tells that after running master there are two open goals (tabs). This means, that master was able to prove one of the cases automatically, but not the other two. They are quite likely wrong, because the program looks like it should be handled automatically even though the differential equation does not come with an @invariant
annotation. Indeed, temp>10 -> temp>20
doesn't look very true. Try Counterexample
on that branch, it'll show something like temp=11. The same is true for the induction step: even when starting at temp>10
(say temp=13
) the program can end up at temp<=10
, because the differential equation decreases temperature (temp'=-50*0.01
), so if we just follow the differential equation long enough the temperature will drop below 10. This means that both the invariant and the program must be changed to guarantee your safety property. Pay particular attention to the use case and the induction step. Usually, the induction step is the hardest to get right, because it requires a combination of finding the right invariant and writing a correct program.
A good way of learning about the different proof techniques by just interacting with KeYmaera X is when you hover the mouse over formulas. Turning a formula background dark on hovering is the KeYmaera X way of telling you that you can do something with that formula. Right-click to see what particular proof tactics apply. If you are willing to spend a little extra time: manual interaction gives you more control over the proof, more insight into your model, and facilitates learning in our experience.
from keymaerax-release.
Related Issues (20)
- [UI] [enhancement] Model pop-up dialog does not auto-close upon running incomplete tactic
- empty Tactic block => internal safety check violated
- [UI] only allow editing existing model while "edit" button is active
- opening deleted proof-> lots of error dialogs
- [parser/printer?] KeYmaera X allows uploading models with Unicode characters, then errs HOT 1
- mond context-menu UI bug
- dV on "equals": an implementation is missing HOT 2
- KeyMaeraX not Loading HOT 2
- Mathematica and Wolfram Engine Configuration HOT 1
- Input {48, MemoryConstrained[...]} cannot be evaluated, cause: {HoldForm[MessageName[ForAll, "msgs"]]} HOT 2
- Configuration.sanitizedPathSegments breaks execution on Windows HOT 4
- Error with derived axioms database in KeYmaera 5.0.2 HOT 2
- JDK 12 Build Error Again
- Cannot prove lemmas due to overlapping UI elements HOT 1
- Archive only uploads halfway when some entries contain non-fatal errors
- Some syntax errors only found upon starting proof HOT 1
- Late definition usubst clash checking leads to less direct error messages
- [UI] [enhancement] Change right-click menu closing logic
- [UI] [enhancement] Not obvious to user why diRule breaks tactic editor goal-switching HOT 6
- [UI] [enhancement] raw token names in alternative tactic editor display are surprising
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keymaerax-release.