Truth isn’t Truth

I can prove that Joe Biden stole the election. What I tell you three times is true!

Let’s check the rumors. The following program counts assertions in order to check whether they are true. As everybody knows, assertions become facts if they have been told three times. The input to the function “atLeastThrice” is the list “assertions”. The output the function is a list of those statements which are found at least thrice. (The program is written in Haskell. Therefore it must be true.)

#! /usr/bin/haskell
import Data.List
someAssertions :: [String]
someAssertions =
  ["Biden stole the election!"
  ,"Truth isn’t truth."
  ,"Truth isn’t truth."
  ,"Truth isn’t truth."
  ,"Biden stole the election!"
  ,"Biden stole the election!"
atLeastThrice :: [String] -> [String]
atLeastThrice assertions =
  [head grp | grp <-
    group $ sort assertions, length grp >= 3]

Output (if loaded and executed in GHCi):

*Main> atLeastThrice someAssertions
["Biden stole the election!","Truth isn’t truth."]

You see, “1+1=2.” is wrong because it appears less than three times in the statement list. Two times is not enough. Everybody knows that. The other two assertions are true, because they have been stated thrice.

Some rather insecure (and therefore very assertive) people apply the Bellman’s rule twice or even more often.

2018-08-24, update 2021-02-15