Giter VIP home page Giter VIP logo

agda-extras's Introduction

agda-extras

Some extra stuff to supplement agda-stdlib (v1.3).

Theories

Currently has some additional theories on Nat in src/Extra/Data/Nat, including

  • Factorials _! (in Factorial.agda)
    • m≤n⇒m!∣n! : _! Preserves _≤_ ⟶ _∣_
  • Binomial coefficients _C_ (in Binomial.agda)
    • C-!-div : ∀ (m n : ℕ) → (m + n) C m ≡ ((m + n) !) / (m ! * n !)
    • C-!-mod : ∀ (m n : ℕ) → ((m + n) !) % (m ! * n !) ≡ 0
  • Fibonacci numbers fib (in Fibonacci.agda)
    • fib-rec : ∀ (m n : ℕ) → fib (suc (m + n)) ≡ fib m * fib n + fib (suc m) * fib (suc n)
    • fib-gcd-suc : ∀ n → gcd (fib n) (fib (suc n)) ≡ 1
    • fib-gcd : ∀ (m n : ℕ) → gcd (fib m) (fib n) ≡ fib (gcd m n)
  • GCD (in GCD.agda)
    • gcd[n,0]≡n : ∀ n → gcd n 0 ≡ n
    • gcd-split : ∀ m n d → Coprime m n → d ∣ m * n → d ≡ gcd d m * gcd d n
    • gcd-multʳ : ∀ k → Multiplicative (gcd k)
    • gcd-induction : ∀ {P : ℕ → ℕ → Set} (m n : ℕ) → (∀ m → P m 0) → (∀ m n {≢0} → P n ((m % n) {≢0}) → P m n) → P m n
  • Primes (in Prime.agda)
    • Definition of Composite
    • composite-div : ∀ {n} → Composite n → ∃[ d ] (1 < d × d < n × d ∣ n)
    • ∃p∣n : ∀ {n} → n > 1 → ∃[ p ] (Prime p × p ∣ n)
    • Infinitude of primes: inf-primes : Inf Prime

agda-extras's People

Contributors

mlyean avatar

Stargazers

 avatar

Watchers

 avatar  avatar

agda-extras's Issues

Totally Off Topic

Hi Lim,

I'm sorry if this is an improper forum, but I'd like to poke your brain if I could. I noticed that you had the fastest time on this question in Haskell on Kattis. I've tried several things, but haven't been able to crack the 0.04 seconds mark. I even went overboard and tried to parallelize it, but that actually made it 0.01s slower.

Would you be willing to share some ideas? It's such a simple problem, and yet I'm curious about its micro-optimization.

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.