Giter Site home page Giter Site logo

sf's Introduction

sf

Working Software Foundations

Proof General (Emacs plugin) tips:

  • C-c C-RET
  • C-c C-p : for displaying goals
  • C-c C-l : Refreshes goals
  • C-c C-a C-a : Run SearchAbout
  • C-c C-; : Paste SearchAbout response into buffer
  • C-/ : Go to the proof end (Very handy!)

Useful functions:

  • coq-Print : View the definition of particular function

Notes:

Things which aren't in the book and learned from seeing other's code.

  1. You can rewrite like this:
rewrite <- plus_comm with (n := n' * m) (m := m + m) at 1.

See different styles here.

  1. Admmitting asserts

  2. Symmetry tactic for exchanging LHS and RHS

apply tactic

Example 1

Theorem f_equal : forall (A B : Type) (f: A -> B) (x y: A),
  x = y -> f x = f y.

Current goals:

  H : ....
  ============================
   S n = S m'
apply f_equal.

Current goals:

  H : ....
  ============================
   n = m'

Example 2

  n' : nat
  IHn' : forall m : nat, n' + n' = m + m -> n' = m
  m' : nat
  H1 : n' + n' = m' + m'
  ============================
   S n' = S m'
apply IHn' with (m := m') in H1.
  n' : nat
  IHn' : forall m : nat, n' + n' = m + m -> n' = m
  m' : nat
  H1 : n' = m
  ============================
   S n' = S m'

destruct tactic

Example 1

H : P \/ Q
=============
S n' = S m'
destruct H as [H1 | H2].
H1 : P
========
S n' = S m'

Example 2

  H2 : exists x : A, f x = y /\ In x l'
  ============================
   exists x : A, f x = y /\ (x' = x \/ In x l')
destruct H2
  x : A
  H : f x = y /\ In x l'
  ============================
   exists x0 : A, f x0 = y /\ (x' = x0 \/ In x0 l')

Example 3

  H : f x = y /\ In x l
  ============================
   In y (map f l)
destruct H as [H1 H2].
  H1 : f x = y
  H2 : In x l
  ============================
   In y (map f l)

References:

sf's People

Contributors

psibi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

pennyyezi

sf's Issues

Chapter 3

These theorems are still remaining:

remove_decreases_count
bag_count_sum
nonzeros_app
rev_injective

Chapter 5

combine_split
And additional exercies

Chapter 6

All_In
combine_odd_even_intro
tr_rev_correct

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.