GithubHelp home page GithubHelp logo

poltac's Introduction

Poltac

Docker CI

A set of tactics to deal with inequalities in Coq over N, Z and R:

  • pols: simplification
  • polf: factorization
  • polr: replacement

inspired from https://hal.inria.fr/inria-00070394

To build:

make all

To use it:

Require Import PolTac.

Examples

See Nex.v, Zex.v and Rex.v.

Demo: a running example (polr_test2 in Rex.v)

1 subgoal
x : R
y : R
z : R
t : R
u : R
H : t < 0
H1 : y = u
H2 : x + z < y
______________________________________(1/1)
2 * y * t < x * t + t * u + z * t

We use polf to remove t from the left and the right side of the inequality since t is negative it changes the direction of the inequality.

polf.

1 subgoal

....
H1 : y = u
....
______________________________________(1/1)
x + u + z < 2 * y

We use polr to replace u by y in the goal.

polr H1; auto with real.

1 subgoal

....
H2 : x + z < y
....
______________________________________(1/1)
x + y + z < 2 * y

We use polr to bound x + y + z using H2.

polr H2.

2 subgoals
...
______________________________________(1/2)
x + y + z < y + y

...
______________________________________(2/2)
y + y <= 2 * y

We use pols to simply by y on both sides.

pols.

2 subgoals
...
______________________________________(1/2)
x + z < y

...
______________________________________(2/2)
y + y <= 2 * y

This exactly `H2`.

```coq
exact H2.

1 subgoal

...
______________________________________(1/1)
y + y <= 2 * y

We use pols to simply by y on both sides.

1 subgoal
...
______________________________________(1/1)
0 <= 0

[email protected]

Meta

  • Author(s):
    • Laurent Théry
  • License: MIT License
  • Compatible Coq versions: 8.19 or later
  • Additional dependencies: none
  • Coq namespace: PolTac
  • Related publication(s): none

Building and installation instructions

To build and install manually, do:

git clone https://github.com/thery/poltac.git
cd poltac
make   # or make -j <number-of-cores-on-your-machine> 
make install

poltac's People

Contributors

soraros avatar thery avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

armael

poltac's Issues

Setting Z.add, Z.mul, etc as Opaque break the tactics

This is not very surprising, but setting Z.add or other operators to Opaque breaks PolTac (because it breaks tactics in poltac such as Zsimpl := simpl Z Zplus Zmult Zopp ...).

I'm not sure what is the proper way of fixing this.
If there was a way of ensuring that these identifiers are transparent locally, that would be a solution, but I don't think it's possible currently.
An other solution I see is rewriting Zsimpl and other to use rewriting with the right lemmas instead of simpl.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.