Giter Club home page Giter Club logo

coq-tricks's Introduction

Tricks in Coq

Some tips, tricks, and features in Coq that are hard to discover.

If you have a trick you've found useful feel free to submit an issue or pull request!

  • pattern tactic
  • lazymatch for better error messages
  • Search vernacular variants
  • deex tactic
  • ::= to re-define Ltac
  • learn approach - see Clément's thesis
  • tactics in terms
    • ltac:(eauto) for argument to proof
  • unshelve tactical, especially useful with an eapply - good example use case is constructing an object by refinement where the obligations end up being your proofs with the values as evars, when you wanted to construct the values by proof
  • Search s -Learnt for a search of local hypotheses excluding Learnt
  • unfold "+" works
  • destruct matches tactic
  • maximally inserted implicit arguments are implicit even when for identifier alone (eg, nil is defined to include the implicit list element type)
  • maximally inserted arguments can be defined differently for different numbers of arguments - undocumented but eq_refl provides an example
  • using instantiate to modify evar environment (thanks to Jonathan Leivent on coq-club)
  • strong induction is in the standard library: Require Import Arith Wf and use induction n using (well_founded_induction lt_wf).
  • dependent destruction and dependent induction require Require Import Coq.Program.Equality. (included in an example on the manual); the error message without this import does not mention them (error message will be improved in v8.7 release).
  • r.(Field) syntax: same as Field r, but convenient when Field is a projection function for the (record) type of r.

coq-tricks's People

Contributors

tchajed avatar

Watchers

 avatar

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.