Skip to content

Instantly share code, notes, and snippets.

@Kuniwak
Last active August 28, 2021 00:33
Show Gist options
  • Save Kuniwak/1dfce51d0a883f52eed80b0c0ca2e8c3 to your computer and use it in GitHub Desktop.
Save Kuniwak/1dfce51d0a883f52eed80b0c0ca2e8c3 to your computer and use it in GitHub Desktop.
theorem
fixes f :: "'x ⇒ 'y ⇒ 'y"
assumes finite: "finite X"
and eq: "⋀x. x ∈ X ⟹ f x = g x"
shows "Finite_Set.fold f z X = Finite_Set.fold g z X"
using finite using eq by (rule_tac fold_closed_eq[where ?B=UNIV]; simp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment