def replicate_add

bend-collections-laws-math@1.0.0.0 · proofs/lib/list.bend:53

import bend-collections-laws-math@1.0.0.0/proofs/lib/list.bend as List
import Base
import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as SC

53def replicate_add(-A: Data, +m: Nat, +n: Nat, +x: A) -> {SC.append(A, SC.replicate(A, m, x), SC.replicate(A, n, x)) == SC.replicate(A, Nat.add(m, n), x) : List<&2, A>}:
54  match m:
55    case 0n:
56      {==}
57    case 1n+p:
58      cons_cong(A, x, SC.append(A, SC.replicate(A, p, x), SC.replicate(A, n, x)), SC.replicate(A, Nat.add(p, n), x), replicate_add(A, p, n, x))

Uses (6)

Used by (0)

No other definition uses this definition.