code: func (q *Query) implies(r *Query) bool {
  	if q.Op == QNone || r.Op == QAll {
  		// False implies everything.
  		// Everything implies True.
  		return true
  	}
  	if q.Op == QAll || r.Op == QNone {
  		// True implies nothing.
  		// Nothing implies False.
  		return false
  	}
  
  	if q.Op == QAnd || (q.Op == QOr && len(q.Trigram) == 1 && len(q.Sub) == 0) {
  		return trigramsImply(q.Trigram, r)
  	}
  
  	if q.Op == QOr && r.Op == QOr &&
  		len(q.Trigram) > 0 && len(q.Sub) == 0 &&
  		stringSet.isSubsetOf(q.Trigram, r.Trigram) {
  		return true
  	}
  	return false
  }
docs: // implies reports whether q implies r.
  // It is okay for it to return false negatives.